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 / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

Huge Memory Usage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Haim - 26 Dec 2004 14:06 GMT
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.
Herfried K. Wagner [MVP] - 26 Dec 2004 19:23 GMT
"Haim" <haim_lz@hot.com> schrieb:
> I am writing an application in C#, VB.NET which basicaly
> has a form with a few pictureBoxes on it and a TabControl
[quoted text clipped - 4 lines]
> The thing is - this application can take up to 40,000KB
> of memory!!!

How many controls are you using?  Are you displaying images?

> 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???

That's OK.  Remember that the CLR and some larger libraries are loaded for
Windows Forms applications.  Don't worry about that too much.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/

- 27 Dec 2004 07:05 GMT
This application is tested to run on terminal servers and
as such this memory usage is unacceptable, one of the
main concerns when using a terminal server is how much
memory each application consumes. Imagine 20 users, each
using this application - that would mean almost Giga of
memory usage for this application alone!
yes, I have more than a few pictures in the final version
but 40MB of memory is just too much.
I understand that for each dll I'm using in my project
the run time loads the same namespaces
(System.windows.forms for example) again and again. is
there a way to share and load each namespace only once?

Thanks again

Haim.

>-----Original Message-----
>"Haim" <haim_lz@hot.com> schrieb:
[quoted text clipped - 15 lines]
>That's OK.  Remember that the CLR and some larger libraries are loaded for
>Windows Forms applications.  Don't worry about that too much.

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.