Huge Memory Usage

H

Haim

Hello all,
I am writing an application in C#, VB.NET which basicaly
has a form with a few pictureBoxes on it and a TabControl
with 3 tab pages - in each one a treeView and a ListView.
In addition it loads a few other dll's as a reference
which should not be memory consuming since each have a
few simple classes.
The thing is - this application can take up to 40,000KB
of memory!!!
Any idea where to start checking? How can I debug and see
what part of my application is responsible for such
memory usage?

One more thing: I did some tests and noticed that even a
simple form with nothing on it can take up to 15,000KB ,
am I doing something wrong???

Thanks,

Haim.
 
M

Mattias Sjögren

Any idea where to start checking? How can I debug and see
what part of my application is responsible for such
memory usage?

A profiler such as this one can help you figure out which objects use
up most memory

http://www.microsoft.com/downloads/details.aspx?FamilyID=86ce6052-d7f4-4aeb-9b7a-94635beebdda

One more thing: I did some tests and noticed that even a
simple form with nothing on it can take up to 15,000KB ,
am I doing something wrong???

No, that sounds about right. A lot of memory is used during CLR
startup. But note that the memory may not still be in use. If you let
the working set shrink (happens for example when you minimize the app)
the number may go down quite a bit.



Mattias
 

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