Does Visual Studio frees memory if I interrupt debugging?
Does Visual Studio (I'm using the 2010 ed开发者_开发百科ition) frees the memory when I interrupt debugging and some of the free(memory_pointer) instructions are not yet called?
I think it does but I prefer having a confirmation first
When you interrupt debugging, it won't free any memory because you might want to continue later ...
If you abort debugging, Visual Studio detaches the debugger and aborts the process. In this case, the OS will take care of releasing all resources (i.e. memory, file handles) allocated to the process.
Yes, the OS (not the IDE) frees up any memory explicitly allocated by your process, including GDI handles, when your process ends, forcefully or not.
Note however that this doesn't include out-of-process memory allocations, like COM's IMalloc *
interface or CoTaskMemAlloc
function.
精彩评论