Reputation: 15377
I have a wxWidgets application (wxApp). I am using Visual Studio 2010.
_CrtSetDbgFlag is set in the application's OnInit method.
I would like for the application to throw an exception if a memory leak is detected on exit. I expect this could be done by directly modifying wxWidgets where it dumps the memory leaks, but I would much rather know if there's a standard way to do this instead.
Upvotes: 0
Views: 294
Reputation: 22678
wxWidgets doesn't dump memory leaks itself, the dumps you're seeing are done by MSVC CRT. So whatever you need to do should be done at its level. _CrtSetReportHook()
might be useful.
Upvotes: 1