In a previous question about ridding the system tray of an old NotifyIcon I was told that I should Dispose anything that implements IDisposable. Sounds like good practise to me however as a newbie it raises more questions :-)
How do I know if a control implements IDisposable?
Should I build a class that attempts to dispose everything on all my forms in the formclosed event?
Something like this?(psuedocode):
foreach(control cont in form)
{
try{cont.Dispose()}
catch{}
}
If not, then how do I know what controls I would need to manually dispose, or should I simply watch for unusual behaviour during testing?
G
EDIT:So when I click the big red "X" on my child form, that doesn't cause it to Dispose? is that right? What is the reason for this?