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