/// <summary> /// Clean up any embedded models /// </summary> protected void DisposeChildren() { // Tidy up embedded SolidDNA objects Extension?.Dispose(); Extension = null; // Release the active configuration ActiveConfiguration?.Dispose(); ActiveConfiguration = null; // Selection manager SelectionManager?.Dispose(); SelectionManager = null; }
/// <summary> /// Clean up all COM references for this model, its children and anything that was used by this model /// </summary> protected void DisposeAllReferences() { // Tidy up embedded SolidDNA objects Extension?.Dispose(); Extension = null; // Release the active configuration ActiveConfiguration?.Dispose(); ActiveConfiguration = null; // Selection manager SelectionManager?.Dispose(); SelectionManager = null; // Unhook all events ClearModelEventHandlers(); }