21 Jul
2011
21 Jul
'11
2:15 p.m.
On 07/21/2011 04:02 PM, cc caprani wrote:
int main() { [...] std::cin.get(); // hold console window open _CrtDumpMemoryLeaks(); // report memory leaks }
Hi, I don't know how _CrtDumpMemoryLeaks() works, but at the call point nothing has been deleted yet as nothing went out of scope. Try putting what is in your main() currently into another scope, for example: int main() { { // ... all your code ... } // Now that we exited the previous scope, everything should've // been deleted... std::cin.get(); _CrtDumpMemoryLeaks(); } -- Maxime