Browse Source

[2209] Comment about assert

Michal 'vorner' Vaner 12 years ago
parent
commit
98947382e5
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/lib/datasrc/memory/zone_table_segment_local.cc

+ 5 - 0
src/lib/datasrc/memory/zone_table_segment_local.cc

@@ -29,6 +29,11 @@ ZoneTableSegmentLocal::ZoneTableSegmentLocal(const RRClass& rrclass) :
 }
 
 ZoneTableSegmentLocal::~ZoneTableSegmentLocal() {
+    // Explicitly clear the contained data, and check memory
+    // leak.  assert() (with abort on failure) may be too harsh, but
+    // it's probably better to find more leaks initially.  Once it's stabilized
+    // we should probably revisit it.
+
     ZoneTable::destroy(mem_sgmt_, header_.getTable());
     assert(mem_sgmt_.allMemoryDeallocated());
 }