How does one track down possible memory leaks in .NET 1.1?

D

Dave

Hello,

We have a large client server application written in c# .NET 1.1 using
Sql Server 2000 MSDE as our database. Our application also uses Crystal
Reports 11 and Infgragistics 2005 Version 3. My question is that I
think our app is experiencing some sort of memory leak, but I don't
know for sure.

When we open our program, according to the "VM Size" column in the Task
Manager, our program takes about 26 MB of RAM. After long usage, it has
gone as high as 250 MB! This seems almost obsurd to me, however the
memory seems to somewhat free itself over time (like minutes). So it
seems the GC is doing it's work to a degree. But, the overall "VM
Size" always tends to increase when leaving the app open for a long
period of time dispute the GC releasing memory. What's strange is that
I can open and close the same form over and over again and the memory
imprint seems to go up and up (very slowly)... We're calling Dispose
when the form closes, is this a clue as to what might be going wrong?
Almost all of our forms experience this, big and small.

Some facts about our architecture.

1) We use strongly typed datasets heavily. We have about 20 or so
DataTables that we've made static and "load once" in the beginning of
our application. These are tables that never really change and are used
over and over again by other windows. In other words, we did this
thinking to preserve memory. We're almost certain that this is ok
because the 26 MB imprint that we see is AFTER these static tables
load. And we never re-populate any of these tables again...

2) We tend to use alot of images that are embedded in our dlls
(resource files) in imageLists and PictureBox controls. Does this have
any GC implications that we should be aware of?

We're pretty careful about calling Dispose on all database connections,
File handles and Forms. Is there anything that we should look for in
detail or any techniques to help us find exactly what's consuming all
of that memory?

Thanks,
Dave
 
G

Goran Sliskovic

Dave said:
Hello,
....

We're pretty careful about calling Dispose on all database connections,
File handles and Forms. Is there anything that we should look for in
detail or any techniques to help us find exactly what's consuming all
of that memory?
....

Yes, there is. There are few memory profilers available (google it), some
free and some commercial. The one I liked most is at:
http://www.scitech.se/memprofiler/

It's commercial, but 14 day trial version can be downloaded (should be 100%
functional).

Regards,
Goran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top