From: Mukund Sivaraman Date: Tue, 1 Jan 2013 10:22:49 +0000 (+0530) Subject: [2432] Explain ownership of rrset passed to addRRset() X-Git-Tag: bind10-1.0.0-rc-release~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82d0b7f2ab2fcca6daafdcd5aae06cc0efcd2ffd;p=thirdparty%2Fkea.git [2432] Explain ownership of rrset passed to addRRset() --- diff --git a/src/lib/dns/rrset_collection.h b/src/lib/dns/rrset_collection.h index eb84c4969d..540ef559c3 100644 --- a/src/lib/dns/rrset_collection.h +++ b/src/lib/dns/rrset_collection.h @@ -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.