Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


stop debugging in directx app


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 05 September 2012 - 06:55 PM

I am using visual studio, i have the normal method called render() in the program code were i draw things, sometimes the code is wrong there.
So as an example , the code of the rendrer() makes the program get into an infinite loop and then i have to stop debugging by clicking the blue square(stop debugging) and not by closing the window.
I have the normal method to release the 3Ddevice with all the buffers, layouts, rendertargets...and its only called when you press the close window button. So when i press the stop debugging button does all those things created in the 3D device get released?

Edited by lomateron, 05 September 2012 - 07:01 PM.


Sponsor:

#2 MJP   Moderators   -  Reputation: 11735

Like
0Likes
Like

Posted 05 September 2012 - 11:47 PM

When a process is terminated the OS will clean up any resources that it was using.

#3 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 06 September 2012 - 05:44 AM

but then why do i have to have a method that releases all those things created in the GPU? if the OS will clean them. I though when you press the stop debugging button all resources created in the CPU will be realeased because its a CPU debugger, but the ones created in the GPU will stay and I will get more and more GPU memory full of junk as i debug in visual studio.

#4 MJP   Moderators   -  Reputation: 11735

Like
0Likes
Like

Posted 06 September 2012 - 11:53 AM

Most people will clean up because it's good practice. If you're making a game, you also want to make sure that you're not leaking memory during the game. So for instance if you load a bunch of textures for level A, and then you want to switch to level B, you want to destroy all of the textures from level A so that you have enough memory for the textures in level B.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS