From 5b17f88f0e2310be9d6f57085dfd24fab91000db Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 20 Mar 2008 22:10:52 +0000 Subject: [PATCH] Initialize _owned in the copy constructor as well. [SVN r43739] --- include/boost/enable_shared_from_this.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/enable_shared_from_this.hpp b/include/boost/enable_shared_from_this.hpp index 06c8bc7..f109aa3 100644 --- a/include/boost/enable_shared_from_this.hpp +++ b/include/boost/enable_shared_from_this.hpp @@ -45,6 +45,7 @@ template class enable_shared_from_this mutable shared_ptr<_internal_element_type> _internal_shared_this; mutable weak_ptr<_internal_element_type> _internal_weak_this; mutable bool _owned; + protected: enable_shared_from_this(): @@ -52,7 +53,8 @@ protected: { } - enable_shared_from_this(enable_shared_from_this const &) + enable_shared_from_this(enable_shared_from_this const &): + _owned(false) { }