internal static void Dispose() { if (Interlocked.Decrement(ref _count) != 0) { return; } InstanceCache.Dispose(); }
// 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); }