Parcourir la source

[2209] Comment about assert

Michal 'vorner' Vaner il y a 12 ans
Parent
commit
98947382e5
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  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());
 }