Memory leaks or GC doesn't invoked?

  • Thread starter Thread starter Tod Johnson
  • Start date Start date
T

Tod Johnson

Hello all,

I've written application that uses threads/timers and contains many
different forms. I've noticed that if I left my application for the
whole day then device show message that not enough memory.

I'm not using calls of unmanaged code (I suppose so) but maybe it's the
problem in the GC. Maybe I should force him to clean Gen0, Gen1 objects?
Or maybe there is tips how can I detect memory leaks?

Thank you,
Tod
 
Make sure that the forms you create are eventually disposed of. E.g. if you
do this:

MyForm dlg = new MyForm();
dlg.ShowDialog();

then you would do well to call
dlg.Dispose().

Also make sure you are using SP2
 
Alex said:
Make sure that the forms you create are eventually disposed of. E.g. if you
do this:

MyForm dlg = new MyForm();
dlg.ShowDialog();

then you would do well to call
dlg.Dispose().
oh! thank you for the tips! I'll check it out.
 
Back
Top