diff options
Diffstat (limited to 'src/rt/memory_region.cpp')
| -rw-r--r-- | src/rt/memory_region.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rt/memory_region.cpp b/src/rt/memory_region.cpp index 13de56a3361..0d10146a52b 100644 --- a/src/rt/memory_region.cpp +++ b/src/rt/memory_region.cpp @@ -152,10 +152,21 @@ memory_region::~memory_region() { } } #endif - _srv->fatal(msg, __FILE__, __LINE__, "%d objects", _live_allocations); + if (!_hack_allow_leaks) { + _srv->fatal(msg, __FILE__, __LINE__, + "%d objects", _live_allocations); + } else { + _srv->warning(msg, __FILE__, __LINE__, + "%d objects", _live_allocations); + } if (_synchronized) { _lock.unlock(); } } +void +memory_region::hack_allow_leaks() { + _hack_allow_leaks = true; +} + // // Local Variables: // mode: C++ |
