]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2060] clarified the ownership of obj returned via getFinder/AllRRsets.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 3 Oct 2012 16:21:16 +0000 (09:21 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 3 Oct 2012 16:21:16 +0000 (09:21 -0700)
src/lib/datasrc/zone.h

index a417500399dea32d127836eaade672415a7476cb..3885aeef74d8273cf8906d4127bf7265398bf0b8 100644 (file)
@@ -332,10 +332,15 @@ public:
     protected:
         /// \brief Return the \c ZoneFinder that created this \c Context.
         ///
-        /// A derived class implementation can return NULL if it specializes
+        /// A derived class implementation can return NULL if it defines
         /// other protected methods that require a non NULL result from
         /// this method.  Otherwise it must return a valid, non NULL pointer
         /// to the \c ZoneFinder object.
+        ///
+        /// When returning non NULL, the ownership of the pointed object
+        /// was not transferred to the caller; it cannot be assumed to be
+        /// valid after the originating \c Context object is destroyed.
+        /// Also, the caller must not try to delete the returned object.
         virtual ZoneFinder* getFinder() = 0;
 
         /// \brief Return a vector of RRsets corresponding to findAll() result.
@@ -343,10 +348,15 @@ public:
         /// This method returns a set of RRsets that correspond to the
         /// returned RRsets to a prior \c findAll() call.
         ///
-        /// A derived class implementation can return NULL if it specializes
+        /// A derived class implementation can return NULL if it defines
         /// other protected methods that require a non NULL result from
         /// this method.  Otherwise it must return a valid, non NULL pointer
         /// to a vector that correspond to the expected set of RRsets.
+        ///
+        /// When returning non NULL, the ownership of the pointed object
+        /// was not transferred to the caller; it cannot be assumed to be
+        /// valid after the originating \c Context object is destroyed.
+        /// Also, the caller must not try to delete the returned object.
         virtual const std::vector<isc::dns::ConstRRsetPtr>*
         getAllRRsets() const = 0;