Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 14 Mar 2006 20:59 GMT
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
Goran Sliskovic - 15 Mar 2006 00:53 GMT
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.