|
Boost-Commit : |
From: d.frey_at_[hidden]
Date: 2008-04-29 01:32:14
Author: daniel_frey
Date: 2008-04-29 01:32:13 EDT (Tue, 29 Apr 2008)
New Revision: 44873
URL: http://svn.boost.org/trac/boost/changeset/44873
Log:
Fixed comment to reflect the intention and the current code
Text files modified:
trunk/boost/enable_shared_from_this.hpp | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
Modified: trunk/boost/enable_shared_from_this.hpp
==============================================================================
--- trunk/boost/enable_shared_from_this.hpp (original)
+++ trunk/boost/enable_shared_from_this.hpp 2008-04-29 01:32:13 EDT (Tue, 29 Apr 2008)
@@ -44,10 +44,7 @@
// virtual destructor because we need a vtable for dynamic_cast from base to derived to work
virtual ~enable_shared_from_this()
{
-// make sure no dangling shared_ptr objects were created by the
-// user calling shared_from_this() but never passing ownership of the object
-// to a shared_ptr.
- BOOST_ASSERT( _shared_count.use_count() <= 1 );
+ BOOST_ASSERT( _shared_count.use_count() <= 1 ); // make sure no dangling shared_ptr objects exist
}
public:
@@ -92,6 +89,7 @@
detail::sp_deleter_wrapper * pd = detail::basic_get_deleter<detail::sp_deleter_wrapper>( _shared_count );
BOOST_ASSERT( pd != 0 );
pd->set_deleter( owner.get_shared_count() );
+
owner.reset( _shared_count, owner.get() );
detail::shared_count().swap( _shared_count );
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk