Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56735 - trunk/boost/serialization
From: ramey_at_[hidden]
Date: 2009-10-12 12:27:06


Author: ramey
Date: 2009-10-12 12:27:05 EDT (Mon, 12 Oct 2009)
New Revision: 56735
URL: http://svn.boost.org/trac/boost/changeset/56735

Log:
fix memory leaks
Text files modified:
   trunk/boost/serialization/void_cast.hpp | 11 +++--------
   1 files changed, 3 insertions(+), 8 deletions(-)

Modified: trunk/boost/serialization/void_cast.hpp
==============================================================================
--- trunk/boost/serialization/void_cast.hpp (original)
+++ trunk/boost/serialization/void_cast.hpp 2009-10-12 12:27:05 EDT (Mon, 12 Oct 2009)
@@ -18,7 +18,6 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 
 #include <cstddef> // for ptrdiff_t
-#include <boost/weak_ptr.hpp>
 #include <boost/noncopyable.hpp>
 
 #include <boost/serialization/config.hpp>
@@ -112,10 +111,8 @@
     // Data members
     const extended_type_info * m_derived;
     const extended_type_info * m_base;
- boost::weak_ptr<const extended_type_info> m_derived_observer;
- boost::weak_ptr<const extended_type_info> m_base_observer;
     /*const*/ std::ptrdiff_t m_difference;
- const bool m_heap; // allocated on the heap
+ void_caster const * const m_parent;
 
     // note that void_casters are keyed on value of
     // member extended type info records - NOT their
@@ -135,14 +132,12 @@
         extended_type_info const * derived,
         extended_type_info const * base,
         std::ptrdiff_t difference = 0,
- bool heap = false
+ void_caster const * const parent = 0
     ) :
         m_derived(derived),
         m_base(base),
- m_derived_observer(derived->get_weak_ptr()),
- m_base_observer(base->get_weak_ptr()),
         m_difference(difference),
- m_heap(heap)
+ m_parent(parent)
     {}
     virtual ~void_caster(){}
 };


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