protected override void OnHandleDestroyed(EventArgs e) { if (context != null) { context.Dispose(); context = null; } if (implementation != null) { implementation.WindowInfo.Dispose(); implementation = null; } base.OnHandleDestroyed(e); }