Browse Source

[2088] Add virtual destructor to MemorySegment

Mukund Sivaraman 13 years ago
parent
commit
96c432de78
2 changed files with 6 additions and 0 deletions
  1. 3 0
      src/lib/util/memory_segment.h
  2. 3 0
      src/lib/util/memory_segment_local.h

+ 3 - 0
src/lib/util/memory_segment.h

@@ -28,6 +28,9 @@ namespace util {
 /// in code.
 class MemorySegment {
 public:
+    /// \brief Destructor
+    virtual ~MemorySegment() {}
+
     /// \brief Allocate/acquire a segment of memory. The source of the
     /// memory is dependent on the implementation used.
     ///

+ 3 - 0
src/lib/util/memory_segment_local.h

@@ -33,6 +33,9 @@ public:
     MemorySegmentLocal() : allocated_size_(0) {
     }
 
+    /// \brief Destructor
+    virtual ~MemorySegmentLocal() {}
+
     /// \brief Allocate/acquire a segment of memory. The source of the
     /// memory is libc's malloc().
     ///