protected override void OnHandleDestroyed(EventArgs e) { base.OnHandleDestroyed(e); if (graphicsContext != null) { graphicsContext.Dispose(); graphicsContext = null; } if (windowInfo != null) { windowInfo.Dispose(); windowInfo = null; } }
public static void DestroyDummyContext() { context.Dispose(); windowInfo.Dispose(); control.Dispose(); }