mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-13 11:14:59 +03:00
Debug flag and test mode improvements
1. ifdef DEBUG -> defined(_DEBUG) || defined(DEBUG) In VC++ compilers, the macro is "_DEBUG", not "DEBUG". 2. If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. For normal debug we set memcheck = false. Please set memcheck = true if you want to test the cause of memory leaks.
This commit is contained in:
committed by
Davide Beatrici
parent
66b906378f
commit
8abcf3d0a9
@ -355,8 +355,11 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow)
|
||||
{
|
||||
InitProcessCallOnce();
|
||||
|
||||
#ifdef DEBUG
|
||||
InitMayaqua(true, true, 0, NULL);
|
||||
#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG".
|
||||
// If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak.
|
||||
// For normal debug we set memcheck = false.
|
||||
// Please set memcheck = true if you want to test the cause of memory leaks.
|
||||
InitMayaqua(false, true, 0, NULL);
|
||||
#else
|
||||
InitMayaqua(false, false, 0, NULL);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user