Parcourir la source

plugged a leak in the destructor

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/jinmei-dnsrdata2@787 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya il y a 15 ans
Parent
commit
d49b0ce988
2 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 5 0
      src/lib/dns/cpp/rdata.cc
  2. 1 0
      src/lib/dns/cpp/rdata.h

+ 5 - 0
src/lib/dns/cpp/rdata.cc

@@ -182,6 +182,11 @@ Generic::Generic(const string& rdata_string)
     impl_ = new GenericImpl(data);
 }
 
+Generic::~Generic()
+{
+    delete impl_;
+}
+
 Generic::Generic(const Generic& source) :
     impl_(new GenericImpl(*source.impl_))
 {}

+ 1 - 0
src/lib/dns/cpp/rdata.h

@@ -119,6 +119,7 @@ class Generic : public Rdata {
 public:
     explicit Generic(const std::string& rdata_string);
     explicit Generic(InputBuffer& buffer, size_t rdata_len);
+    virtual ~Generic();
     Generic(const Generic& source);
     Generic& operator=(const Generic& source);
     virtual std::string toText() const;