Memory management or .net bug?

Winston

Junior Contributor
Joined
Jan 25, 2003
Messages
266
Location
Sydney, Australia
Hey guys for some reason my app uses like 34-40 megs of ram i have no idea

just a little bit of linera gradeint color for panels

two timers

and thats about it

oh and serialization class for xml


any of u got tips to help memory management in coding or wateva


or is it a bug in the framework coz i ran my app on framwork 1.0 sp2 stll same problem, i got a friend who had 2003.net and compiled it int hat then the app ran like 23 megs

ahhh
 
A lot of the memory taken up by the application is probably the framework
loaded into memory. There isn't really a way around it.
 
Then they can't be doing the same things you are in your app. If you doubt some of your code is being as memory-friendly as possible, post it here and I'll let you know.
 
Well, actually this was a problem I pointed in several newsgroups (including Microsoft's), and I'm still waiting for a good answer for this problem, an App made on VB6 uses 12Mb the same App made on .NET uses 30MB or more (depending on the mood of the Framework that morning). They gave me documents and stuff about the garbage collector, references, etc. and nothing worked out
I think this is a bug on the framework, for example, when you dispose an object and then force the GC, it is supposed to get your RAM back, but it keeps the same.
Let's hope that MS works around this in the 1.1 version of the framework, for the moment I solved this problem buying more RAM for the computers on the company
 
Buying more ram was probably not necessary. It's not my job to defend Microsoft or explain to you how the garbage collector works, but I will say that it is only hungry for memory if memory is available. If you're running short, the program will run just fine and use less ram.

Search the internet and you'll find lots of information regarding the myth that .net needs loads of memory, and also on how the garbage collector works, which will hopefully inform you why calling GC.Collect() will not necessarily collect every object in limbo right away.
 
Back
Top