forked from enlightenment/efl
eina_csharp: fix memory leak in Eina.Hash.Set method
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>> Differential Revision: https://phab.enlightenment.org/D8236
This commit is contained in:
parent
afc2974738
commit
4a306ec39b
|
@ -415,6 +415,8 @@ public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDi
|
|||
IntPtr old = eina_hash_set(Handle, nk, nv);
|
||||
FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
|
||||
FreeNativeIndirection<TValue>(gchnv, false);
|
||||
if (OwnValue || old != IntPtr.Zero)
|
||||
NativeFree<TValue>(old);
|
||||
}
|
||||
|
||||
public TValue this[TKey key]
|
||||
|
|
Loading…
Reference in New Issue