about summary refs log tree commit diff
path: root/src/rt/memory_region.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-09-08 16:59:23 -0700
committerBrian Anderson <banderson@mozilla.com>2011-09-11 17:31:40 -0700
commit22001d1dcef5d2c40a242402f75d5acc540bee2b (patch)
treea55206e06b4cc3dabebb699d295c9b83704c0b94 /src/rt/memory_region.cpp
parentd267e7486e7158f8633424389f789d23149e1064 (diff)
downloadrust-22001d1dcef5d2c40a242402f75d5acc540bee2b.tar.gz
rust-22001d1dcef5d2c40a242402f75d5acc540bee2b.zip
Remove hack_allow_leaks
Happy to close the loop on this one.

Issue #236
Diffstat (limited to 'src/rt/memory_region.cpp')
-rw-r--r--src/rt/memory_region.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/rt/memory_region.cpp b/src/rt/memory_region.cpp
index ef8a92b427f..a55d073543d 100644
--- a/src/rt/memory_region.cpp
+++ b/src/rt/memory_region.cpp
@@ -15,13 +15,13 @@ memory_region::alloc_header *memory_region::get_header(void *mem) {
 memory_region::memory_region(rust_srv *srv, bool synchronized) :
     _srv(srv), _parent(NULL), _live_allocations(0),
     _detailed_leaks(srv->env->detailed_leaks),
-    _synchronized(synchronized), _hack_allow_leaks(false) {
+    _synchronized(synchronized) {
 }
 
 memory_region::memory_region(memory_region *parent) :
     _srv(parent->_srv), _parent(parent), _live_allocations(0),
     _detailed_leaks(parent->_detailed_leaks),
-    _synchronized(parent->_synchronized), _hack_allow_leaks(false) {
+    _synchronized(parent->_synchronized) {
 }
 
 void memory_region::add_alloc() {
@@ -127,7 +127,7 @@ memory_region::~memory_region() {
         assert(leak_count == _live_allocations);
     }
 #endif
-    if (!_hack_allow_leaks && _live_allocations > 0) {
+    if (_live_allocations > 0) {
         _srv->fatal(msg, __FILE__, __LINE__,
                     "%d objects", _live_allocations);
     }
@@ -135,11 +135,6 @@ memory_region::~memory_region() {
 }
 
 void
-memory_region::hack_allow_leaks() {
-    _hack_allow_leaks = true;
-}
-
-void
 memory_region::release_alloc(void *mem) {
     alloc_header *alloc = get_header(mem);
     assert(alloc->magic == MAGIC);