public override void Unload() { base.Unload(); imageTexture.Dispose(); imagePanel.Dispose(); imagePanel = null; statusStrip = null; visualizerCanvas = null; imageTexture = null; }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (!disposed) { if (disposing) { MakeCurrent(); if (texture != null) { texture.Dispose(); texture = null; } allowUpdate = false; disposed = true; } } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (!disposed) { if (disposing) { MakeCurrent(); if (labelTexture != null) { labelTexture.Dispose(); labelTexture = null; } if (labelFont != null) { labelFont.Dispose(); labelFont = null; } disposed = true; } } base.Dispose(disposing); }