Exemplo n.º 1
0
        private void Dispose(bool disposing)
        {
            var handle = Interlocked.Exchange(ref _handle, IntPtr.Zero);

            if (IsOwner && handle != IntPtr.Zero) // only dispose undisposed objects that we own
            {
                Interop.DictFree(handle);
                Context = null;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Frees the dictionary handle.
 /// </summary>
 protected override bool ReleaseHandle()
 {
     Interop.DictFree(handle);
     return(true);
 }