I'm working on a Direct3D application and I sometimes need to terminate the application forcefully via the debugger. After the application has been terminated in this way a couple of times, Direct3D reports an "Out of video memory" error when attempting to create a new device. Presently I am working around this by switching my display resolution to 800x600 and back to previous resolution in the hope of "resetting" video memory. It works 99% of the time. But it would be nice to have a simple utility -- a command line app, perhaps -- to quickly reset my graphics card and Direct3D stack by releasing video memory explicitly.
How can I free video memory and other resources left behind by a forcefully terminated Direct3D application?