Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

demonrealms

The biggest problem of all

This topic is 5564 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m having the worst luck. I''m programming my game and I''m getting failings all over my computer. I''m getting into DirectX and a alert box pops up saying sorry, virtual memory is gone. Then 20 thousand other errors then the computer locks up. Now I can hardly do aynthing, let alone get on the internet. Everything is running sooo slow. Please help. Was it becuase I didn''t put if(lpdd) { lpdd->Release(); lpdd=NULL; ? Please help my computer is crasing left and right now. And its not even 3 months old!!!!!

Share this post


Link to post
Share on other sites
Advertisement
Well, if you didn't release your directdraw object, then after so many times you run your game, your computer will run out of resources - which causes everything to screw up. You can fix it by just restarting.

The Release() function in necessary to free up any memory directdraw used in your program. If you don't call it, then that memeory never gets freed up, and eventually, you'll run out.

So, stick that Release() in there.


HellspawnXIII
Build a man a fire, and he'll be warm for a day. Set him on fire, and he'll be warm for the rest of his life.

[edited by - HellspawnXIII on March 31, 2003 10:00:34 PM]

Share this post


Link to post
Share on other sites
Eh, I guess it could go there... In my game, I run a separate ShutDown() function when the player chooses to quit that frees up all that stuff, and then I send the WM_DESTROY message. But, I''m not sure if it''ll make any difference.

Also, if you''re using DirectInput and/or DirectAudio, you have to do the Release() functions in those too.


HellspawnXIII
Build a man a fire, and he''ll be warm for a day. Set him on fire, and he''ll be warm for the rest of his life.

Share this post


Link to post
Share on other sites
quote:
Original post by RamboBones
Everything should be automatically released when your program terminates.


Not with COM. COM is managed by the OS. If you do not release it you will run out of resources because the OS never receives a singnal to release.



Qui fut tout, et qui ne fut rien
Invader''s Realm

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!