Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
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.
Whatever thy hand findest to do, do it with all thy heart - Jesus

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...