mrdance Posted June 3, 2004 Posted June 3, 2004 I have a memory problem in vb.net. Try the following: 1. create a timer, set interval to 100 ms and enable it 2. create a label 3. in the tick event of the timer type this: label1.text = date.now.tostring 4. Open the taskmanager and look at the process slowly increasing the memory usage 5. Any ideas?? Quote
Administrators PlausiblyDamp Posted June 3, 2004 Administrators Posted June 3, 2004 Tried it here and didn't really notice any increase in memory (although I only ran it for about 5 minutes). How long were you running your application and how large a memory increase did you notice. Also it is worth knowing that .Net uses a lazy garbage collection system for recovering memory - if you have large amounts of RAM available then it will only attempt to reclaim this unused memory when it deems there is enough benefits from doing so. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
mrdance Posted June 3, 2004 Author Posted June 3, 2004 thank you for your time, it seemed like it stabilized it's memory usage later! Quote
Simcoder Posted June 9, 2004 Posted June 9, 2004 if your cpu starts to bog down on memory after running your app for awhile, it may be a good idea to call the garbage.collect function. This should free up some unused memory. you can place this in your timer and it should run fine. Quote Whatever thy hand findest to do, do it with all thy heart - Jesus
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.