G
Glenn Nilsson
Hi!
If I create a new project and build and run it, it will (on my machine)
take 14+ Mb of the physical memory, and about 7 megs of the virtual.
If I then minimize and restores the form it will be at about 1.5/4 megs
instead. Why is this, and how can I programmatically achieve this? I
tried GC.Collect() just for the hell of it, since I don't know exactly
how the memory-handling in .NET is built up, but it didn't do any good
at all.
If I create an empty project with just a [STAThread], nothing more, no
forms, no NotifyIcons, no nothing, it will still use 14 megs, and I
can't even minimize and restore anything to free upp memory.
Ok, maybe the allocated memory gets freed when it needs to be, but it is
really annoying to look at how much memory every .NET-application takes
in the Task Manager.
If I create a small application that only resides in the systray, it's
using more memory than a rather big application written in C++ for example.
What is the secret on how to minimize memory-allocation in .NET?
I tried (not so hard) to find some articles on the net on this subject,
but the search results gets filled up with to many irrelevant hits,
please point my to good sources on this.
/Glenn
If I create a new project and build and run it, it will (on my machine)
take 14+ Mb of the physical memory, and about 7 megs of the virtual.
If I then minimize and restores the form it will be at about 1.5/4 megs
instead. Why is this, and how can I programmatically achieve this? I
tried GC.Collect() just for the hell of it, since I don't know exactly
how the memory-handling in .NET is built up, but it didn't do any good
at all.
If I create an empty project with just a [STAThread], nothing more, no
forms, no NotifyIcons, no nothing, it will still use 14 megs, and I
can't even minimize and restore anything to free upp memory.
Ok, maybe the allocated memory gets freed when it needs to be, but it is
really annoying to look at how much memory every .NET-application takes
in the Task Manager.
If I create a small application that only resides in the systray, it's
using more memory than a rather big application written in C++ for example.
What is the secret on how to minimize memory-allocation in .NET?
I tried (not so hard) to find some articles on the net on this subject,
but the search results gets filled up with to many irrelevant hits,
please point my to good sources on this.
/Glenn