Skip to content

Commit

Permalink
🔔 Check memory leaks when use msvc debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alinshans committed Aug 19, 2017
1 parent deec925 commit 8947778
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Test/test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifdef _MSC_VER
#define _SCL_SECURE_NO_WARNINGS
#endif // _MSC_VER
#endif

#if defined(_MSC_VER) && defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif // check memory leaks

#include "algorithm_performance_test.h"
#include "algorithm_test.h"
Expand Down Expand Up @@ -38,5 +44,9 @@ int main()
unordered_set_test::unordered_set_test();
unordered_set_test::unordered_multiset_test();
string_test::string_test();


#if defined(_MSC_VER) && defined(_DEBUG)
_CrtDumpMemoryLeaks();
#endif // check memory leaks

}

0 comments on commit 8947778

Please sign in to comment.