Winston Posted April 10, 2003 Posted April 10, 2003 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 Quote
*Experts* Volte Posted April 10, 2003 *Experts* Posted April 10, 2003 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. Quote
Winston Posted April 10, 2003 Author Posted April 10, 2003 but i see other apps that are soo low in memory usage Quote
*Gurus* divil Posted April 10, 2003 *Gurus* Posted April 10, 2003 Are they .NET apps? Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Gurus* divil Posted April 10, 2003 *Gurus* Posted April 10, 2003 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. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Winston Posted April 10, 2003 Author Posted April 10, 2003 hmmmm its quite big to post do u have any IM clients ill point out sum problems im having as well divil my icq is 54882708 msn is winnyston_z@hotmail.com Quote
iebidan Posted April 10, 2003 Posted April 10, 2003 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 Quote Fat kids are harder to kidnap
*Gurus* divil Posted April 10, 2003 *Gurus* Posted April 10, 2003 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. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.