You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/09/24 18:23:39 UTC

svn commit: r1000943 - /subversion/branches/object-model/subversion/bindings/c++/include/Pool.h

Author: hwright
Date: Fri Sep 24 16:23:39 2010
New Revision: 1000943

URL: http://svn.apache.org/viewvc?rev=1000943&view=rev
Log:
On the object-model branch:
Remove the Pool "create child pool" constructor which overlapped with the
copy constructor (and could have led to interested consequences).  We weren't
actively using it anyway, so make it private to ensure it isn't called
accidentally.

* subversion/bindings/c++/include/Pool.h
  (operator=): Make arg const.
  (Pool): Make the copy constructor private.
  (Pool): Remove the "child pool" constructor.

Modified:
    subversion/branches/object-model/subversion/bindings/c++/include/Pool.h

Modified: subversion/branches/object-model/subversion/bindings/c++/include/Pool.h
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/bindings/c%2B%2B/include/Pool.h?rev=1000943&r1=1000942&r2=1000943&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/bindings/c++/include/Pool.h (original)
+++ subversion/branches/object-model/subversion/bindings/c++/include/Pool.h Fri Sep 24 16:23:39 2010
@@ -48,24 +48,19 @@ namespace SVN
       apr_pool_t *m_pool;
 
       /**
-       * We declare the assignment operator private here, so that the compiler
-       * won't inadvertently use them for us.  The default copy constructor just
-       * copies all the data members, which would create two pointers to the
-       * same pool, one of which would get destroyed while the other thought it
-       * was still valid...and BOOM!  Hence the private declaration.
+       * We declare the copy constructor and assignment operator private
+       * here, so that the compiler won't inadvertently use them for us.
+       * The default copy constructor just copies all the data members,
+       * which would create two pointers to the same pool, one of which
+       * would get destroyed while the other thought it was still
+       * valid...and BOOM!  Hence the private declaration.
        */
-      Pool &operator=(Pool &that);
+      Pool &operator=(const Pool &that);
+      Pool(const Pool &that);
 
     public:
       Pool();
 
-      // Explicit to avoid being called as an assignment operator.
-      inline explicit
-      Pool(Pool &parent)
-      {
-         m_pool = svn_pool_create(parent.pool());
-      }
-
       inline
       ~Pool()
       {