--------------------------------- SetDebuggingOptions Memory checks in debug mode
| 79 | // Memory checks in debug mode |
| 80 | // |
| 81 | void SetDebuggingOptions() |
| 82 | { |
| 83 | //notify user if heap is corrupt |
| 84 | HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); |
| 85 | |
| 86 | // Enable run-time memory leak check for debug builds. |
| 87 | #if defined(DEBUG) | defined(_DEBUG) |
| 88 | _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); |
| 89 | |
| 90 | typedef HRESULT(__stdcall *fPtr)(const IID&, void**); |
| 91 | |
| 92 | //_CrtSetBreakAlloc( 87 ); |
| 93 | #endif |
| 94 | } |