]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2432] Explain ownership of rrset passed to addRRset()
authorMukund Sivaraman <muks@isc.org>
Tue, 1 Jan 2013 10:22:49 +0000 (15:52 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 1 Jan 2013 10:23:42 +0000 (15:53 +0530)
src/lib/dns/rrset_collection.h

index eb84c4969d9ad3739fcb2617cb90ce7f35105ac3..540ef559c3967f06286a372e6f4f5b7ba123005a 100644 (file)
@@ -52,9 +52,12 @@ public:
     /// \brief Add an RRset to the collection.
     ///
     /// Does not do any validation whether \c rrset belongs to a
-    /// particular zone or not. It throws an \c isc::InvalidParameter
-    /// exception if an rrset with the same class, type and name already
-    /// exists.
+    /// particular zone or not. A reference to \c rrset is taken in an
+    /// internally managed \c shared_ptr, so even if the caller's
+    /// \c RRsetPtr is destroyed, the RRset it wrapped is still alive
+    /// and managed by the \c RRsetCollection. It throws an
+    /// \c isc::InvalidParameter exception if an rrset with the same
+    /// class, type and name already exists.
     void addRRset(isc::dns::RRsetPtr rrset);
 
     /// \brief Remove an RRset from the collection.