public void Dispose() { if (disposed) { return; } disposed = true; GC.SuppressFinalize(this); foreach (Control c in allocatedcontrols) { c.Dispose(); } myView.Dispose(); }
void CharacterFilter_Logoff(object sender, Decal.Adapter.Wrappers.LogoffEventArgs e) { try { hudUpdateTimer.Stop(); if (hudView != null) { hudView.Dispose(); hudView = null; } if (hudListHead != null) { hudListHead.Dispose(); hudListHead = null; } } catch (Exception ex) { Debug.LogException(ex); } }
/// <summary> /// Called when the plugin is shutting down /// </summary> public void Shutdown() { WriteLog($"Plugin.Shutdown"); view.Visible = false; view.Dispose(); }