public void Remove(long id) { Tank Tank; this.idTanks.TryGetValue(id, out Tank); this.idTanks.Remove(id); Tank?.Dispose(); }
public void ClearTanks() { foreach (Tank Tank in this.idTanks.Values) { Tank.Dispose(); } this.idTanks.Clear(); }
public override void Dispose() { if (this.IsDisposed) { return; } base.Dispose(); foreach (Tank Tank in this.m_idTanks.Values) { Tank.Dispose(); } this.m_idTanks.Clear(); Instance = null; }