stop debugging in directx app

Started by
2 comments, last by MJP 11 years, 7 months ago
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?
Advertisement
When a process is terminated the OS will clean up any resources that it was using.
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.
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.

This topic is closed to new replies.

Advertisement