BIND 10 trac997, updated. 49816e5010448c5c966ba3964934adf68a972400 [trac977] Prefer shared ptrs
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jun 13 10:01:29 UTC 2011
The branch, trac997 has been updated
via 49816e5010448c5c966ba3964934adf68a972400 (commit)
from 463a593e465643f157fe806b3fe826b6ed593750 (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 49816e5010448c5c966ba3964934adf68a972400
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Jun 13 12:00:52 2011 +0200
[trac977] Prefer shared ptrs
They will be needed in future, so we don't want to change the interface
then.
-----------------------------------------------------------------------
Summary of changes:
src/lib/acl/acl.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/acl/acl.h b/src/lib/acl/acl.h
index 3e2a561..950af37 100644
--- a/src/lib/acl/acl.h
+++ b/src/lib/acl/acl.h
@@ -17,7 +17,8 @@
#include "check.h"
#include <vector>
-#include <memory>
+
+#include <boost/shared_ptr.hpp>
namespace isc {
namespace acl {
@@ -73,11 +74,11 @@ public:
/**
* \brief Pointer to the check.
*
- * We use auto_ptr here, as it provides protection against memory leaks
- * in case of exceptions, while being a lot more lightweight than
- * boost::shared_ptr (which seems unneeded here, at last for now).
+ * We use the shared pointer, because we are not able to copy the checks.
+ * However, we might need to copy the entries (when we concatenate ACLs
+ * together in future).
*/
- typedef std::auto_ptr<Check<Context> > CheckPtr;
+ typedef boost::shared_ptr<Check<Context> > CheckPtr;
/**
* \brief The actual main function that decides.
*
@@ -98,8 +99,7 @@ public:
* but we may need more when we start implementing some kind optimisations,
* including replacements, reorderings and removals.
*
- * \param check The check to test if the thing matches. The ACL steals
- * ownership of the pointer (which is implicit from the auto_ptr).
+ * \param check The check to test if the thing matches.
* \param action The action to return when the thing matches this check.
*/
void append(CheckPtr check, const Action& action) {
More information about the bind10-changes
mailing list