Hi,
you'll be better off if you dispose everything what is IDisposable. And even
much better if you profile app for allocations, for example with
CLRProfiler, which you can get free from MS site.
You might have issues with memory even with code like this:
using (Brush b = new SolidBrush(Color.Black)) {
...some painting
}
If you call this is in loop or you have too many paints you will finish with
thousands of brushes in heap just because GC is not able to collect all
freed ones.
You might want to check also
http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnpag/html/scalenet.asp
for additional details on how to deal with GC. But profiler is your best bet
to find what is eating memory and why,
HTH
Alex
JMArroyave said:
Hi Sunny, and what about the dataset.dispose
consumes a LOT of memory, i read the posts of dispose in the forum, and all
recomends to leave the GC do this work for managed resources, should i
dispose the datasets and other graphic objects in my app?