diff options
author | Mukund Sivaraman <muks@isc.org> | 2013-01-01 11:22:49 +0100 |
---|---|---|
committer | Mukund Sivaraman <muks@isc.org> | 2013-01-01 11:23:42 +0100 |
commit | 82d0b7f2ab2fcca6daafdcd5aae06cc0efcd2ffd (patch) | |
tree | 7ba449b8adaa95939934c28733bbb05c1f41b571 /src/lib/dns/rrset_collection.h | |
parent | [2432] Add virtual destructor (diff) | |
download | kea-82d0b7f2ab2fcca6daafdcd5aae06cc0efcd2ffd.tar.xz kea-82d0b7f2ab2fcca6daafdcd5aae06cc0efcd2ffd.zip |
[2432] Explain ownership of rrset passed to addRRset()
Diffstat (limited to 'src/lib/dns/rrset_collection.h')
-rw-r--r-- | src/lib/dns/rrset_collection.h | 9 |
1 files changed, 6 insertions, 3 deletions
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. |