protected override void OnClosed(EventArgs e) { messageInterceptor?.ReleaseHandle(); messageInterceptor?.DestroyHandle(); messageInterceptor = null; base.OnClosed(e); nativeForm?.ReleaseHandle(); nativeForm?.DestroyHandle(); }
protected void Dispose() { if (messageInterceptor != null) { messageInterceptor.ReleaseHandle(); messageInterceptor.DestroyHandle(); } messageInterceptor = null; if (nativeForm != null) { nativeForm.ReleaseHandle(); nativeForm.DestroyHandle(); } }
protected override void OnClosed(EventArgs e) { if (messageInterceptor != null) { messageInterceptor.ReleaseHandle(); messageInterceptor.DestroyHandle(); } messageInterceptor = null; base.OnClosed(e); if (nativeForm != null) { nativeForm.ReleaseHandle(); nativeForm.DestroyHandle(); } }