private void CheckDestroy() { if (_childCount != 0) { return; } IntPtr hwndChild = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); if (hwndChild == IntPtr.Zero) { DestroyHandle(); } }