Freeing memory!

Hi! I'm making a game in Visual Basic and I'm using BitBlt for the graphics. The problem is, when I have run it a few times in a row, I have to reboot the computer because there's no memory left to run it again. I'm pretty sure that this is because the DeviceContexts steel so much memory, so now my question is: How do I do to free memory? I want the game to automatically free memory when it ends, so that I can run it again without having to reboot. Is there an API function for that? I would be thankful for an answer!

Comments

  • : Hi! I'm making a game in Visual Basic and I'm using BitBlt for the graphics. The problem is, when I have run it a few times in a row, I have to reboot the computer because there's no memory left to run it again. I'm pretty sure that this is because the DeviceContexts steel so much memory, so now my question is: How do I do to free memory? I want the game to automatically free memory when it ends, so that I can run it again without having to reboot. Is there an API function for that? I would be thankful for an answer!
    :

    If you are using a picturebox for the graphics, you can use:

    Set Picture1.Picture = Nothing

    Are you using any APIs that create something? DCs? Brushes?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion