Postpone leak check so that global destructors can run first
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7213 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
d18c26eea5
commit
ddd40d4397
1 changed files with 2 additions and 2 deletions
|
@ -685,7 +685,8 @@ int _tmain(int argc, TCHAR **argv)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_CHECK_ALWAYS_DF);
|
const int dbgchkthorough = true, checkeveryallocfree = dbgchkthorough ? _CRTDBG_CHECK_ALWAYS_DF : 0;
|
||||||
|
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_ALLOC_MEM_DF | checkeveryallocfree | _CRTDBG_LEAK_CHECK_DF);
|
||||||
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE), _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT);
|
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE), _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT);
|
||||||
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE), _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDOUT);
|
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE), _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDOUT);
|
||||||
//_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE), _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDOUT);
|
//_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE), _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDOUT);
|
||||||
|
@ -694,7 +695,6 @@ int _tmain(int argc, TCHAR **argv)
|
||||||
int retval = makensismain(argc,argv);
|
int retval = makensismain(argc,argv);
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
_CrtDumpMemoryLeaks();
|
|
||||||
assert(_CrtCheckMemory());
|
assert(_CrtCheckMemory());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue