I want to know if Remove() method of List dispose(destruct) element?
In my code, I have a List type of Timer
List<Timer> timerlist;
Timer t = new Timer();
t.Tag = ApptNo.ToString();
t.Interval = ApptInterval * 1000;
t.Tick += tm_Tick;
timerlist.Add(t);
t.Enabled = true;
t.Start();
foreach (Timer t in timerlist)
{
if (string.Equals(t.Tag, ApptNo.ToString()))
{
t.Stop();
timerlist.Remove(t);
break;
}
}
My point of question is whether I should dispose timer object t manually or automatically disposed from timerlist.Remove(t). If t.Dispose() should be called, where should I call it?