Ejemplo n.º 1
0
        internal static void Dispose()
        {
            if (Interlocked.Decrement(ref _count) != 0)
            {
                return;
            }

            InstanceCache.Dispose();
        }
Ejemplo n.º 2
0
 // Derived types will put object initialization code here. At the time of writing such code sets up virtual
 // method callbacks and nothing more.
 internal virtual void PerformInstanceSetup(IntPtr instance, bool ownsInstance)
 {
     OwnsNativeInstance = ownsInstance;
     NativeInstance     = instance;
     InstanceCache.Add(this);
 }