Activate MSVC leak report on exit with a configuratble BeastConfig setting

This commit is contained in:
Vinnie Falco
2013-09-04 16:12:58 -07:00
parent bcd6e9d676
commit a29ced1feb
3 changed files with 15 additions and 7 deletions

View File

@@ -147,6 +147,14 @@
//#define RIPPLE_VERIFY_NODEOBJECT_KEYS 1
#endif
/** Config: RIPPLE_DUMP_LEAKS_ON_EXIT
Displays heap blocks and counted objects which were not disposed of
during exit.
*/
#ifndef RIPPLE_DUMP_LEAKS_ON_EXIT
#define RIPPLE_DUMP_LEAKS_ON_EXIT 1
#endif
/** Config: RIPPLE_TRACK_MUTEXES
Turns on a feature that enables tracking and diagnostics for mutex
and recursive mutex objects. This affects the type of lock used

View File

@@ -6,6 +6,7 @@ Vinnie's List: Changes day to day, descending priority
- Full review of config docs / settings for RPC/WS
- Fix RPCDoor to respect config setting for [rpc_secure]
- Remove addRpcSub, findRpcSub, and notify the appropriate partner(s)
- Make RPCHandler/Server asynchronous
- PeerFinder collaboration with Nikolaos
- beast::Socket integration in Ripple
- Configuration list for Jenkins

View File

@@ -235,20 +235,19 @@ int RippleMain::run (int argc, char const* const* argv)
// At exit, reports all memory blocks which have not been freed.
//
#if 1
Debug::setHeapReportLeaks (false);
#if RIPPLE_DUMP_LEAKS_ON_EXIT
Debug::setHeapReportLeaks (true);
#else
// This is some temporary leak checking test code
//
Debug::setHeapReportLeaks (false);
#endif
#if 0
// This is some temporary leak checking test code
Debug::setHeapReportLeaks (false);
//malloc (512); // Any leaks before this line in the output are from static initializations.
ThreadWithCallQueue t ("test");
GlobalPagedFreeStore::getInstance ();
t.start ();
return 0;
#endif