public void ClearAll() { lock (HandleMap) { foreach (var pair in HandleMap) { if (Blips.Contains(pair.Value)) { new Blip(pair.Value).Remove(); } else if (Pickups.Contains(pair.Value)) { Function.Call(Hash.REMOVE_PICKUP, pair.Value); } else { new Prop(pair.Value).Delete(); } } HandleMap.Clear(); Markers.Clear(); Blips.Clear(); Pickups.Clear(); _localMarkers.Clear(); _markerCount = 0; } }
public override void Shutdown() { base.Shutdown(); foreach (var b in Blips) { b.PropertyChanged -= Blip_PropertyChanged; } Blips.Clear(); TheEditor.FileOpened -= TheEditor_FileOpened; TheEditor.FileClosing -= TheEditor_FileClosing; UnregisterChangeHandlers(); }