Browse Source

[2432] Add virtual destructor

Mukund Sivaraman 12 years ago
parent
commit
2205f81d52
2 changed files with 7 additions and 2 deletions
  1. 4 2
      src/lib/dns/rrset_collection.h
  2. 3 0
      src/lib/dns/rrset_collection_base.h

+ 4 - 2
src/lib/dns/rrset_collection.h

@@ -31,8 +31,7 @@ namespace dns {
 class RRsetCollection : public RRsetCollectionBase {
 public:
     /// \brief Constructor.
-    RRsetCollection()
-    {}
+    RRsetCollection() {}
 
     /// \brief Constructor.
     ///
@@ -47,6 +46,9 @@ public:
     RRsetCollection(const char* filename, const isc::dns::Name& origin,
                     const isc::dns::RRClass& rrclass);
 
+    /// \brief Destructor
+    virtual ~RRsetCollection() {}
+
     /// \brief Add an RRset to the collection.
     ///
     /// Does not do any validation whether \c rrset belongs to a

+ 3 - 0
src/lib/dns/rrset_collection_base.h

@@ -53,6 +53,9 @@ public:
          const isc::dns::RRClass& rrclass)
         const = 0;
 
+    /// \brief Destructor
+    virtual ~RRsetCollectionBase() {}
+
 protected:
     class Iter; // forward declaration
     typedef boost::shared_ptr<Iter> IterPtr;