protected override void Cleanup() { base.Cleanup(); // If we get all the way to here and it's still not cleaned up... if (_cleanupCount > 0 && Interlocked.Exchange(ref _cleanupCount, 0) > 0) { ForceReleaseUnmanagedStructures(); } }