BIND 10 trac2060, updated. fa51dffbe444e5d2ac6a768da001b60ad16d0341 [2060] clarified the ownership of obj returned via getFinder/AllRRsets.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Oct 3 16:21:59 UTC 2012


The branch, trac2060 has been updated
       via  fa51dffbe444e5d2ac6a768da001b60ad16d0341 (commit)
      from  e0ce6d2f3010bfc5998e6c7da202258cbe28c6c6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fa51dffbe444e5d2ac6a768da001b60ad16d0341
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Oct 3 09:21:16 2012 -0700

    [2060] clarified the ownership of obj returned via getFinder/AllRRsets.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/zone.h |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/zone.h b/src/lib/datasrc/zone.h
index a417500..3885aee 100644
--- a/src/lib/datasrc/zone.h
+++ b/src/lib/datasrc/zone.h
@@ -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;
 



More information about the bind10-changes mailing list