|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86195 - trunk/boost/archive/detail
From: ramey_at_[hidden]
Date: 2013-10-07 15:38:26
Author: ramey
Date: 2013-10-07 15:38:26 EDT (Mon, 07 Oct 2013)
New Revision: 86195
URL: http://svn.boost.org/trac/boost/changeset/86195
Log:
replaced delete t where t is a void * with free(t)
Text files modified:
trunk/boost/archive/detail/iserializer.hpp | 42 ----------------------------------------
1 files changed, 0 insertions(+), 42 deletions(-)
Modified: trunk/boost/archive/detail/iserializer.hpp
==============================================================================
--- trunk/boost/archive/detail/iserializer.hpp Mon Oct 7 14:17:32 2013 (r86194)
+++ trunk/boost/archive/detail/iserializer.hpp 2013-10-07 15:38:26 EDT (Mon, 07 Oct 2013) (r86195)
@@ -288,49 +288,7 @@
private:
T* m_p;
};
-#if 0
-// note: BOOST_DLLEXPORT is so that code for polymorphic class
-// serialized only through base class won't get optimized out
-template<class Archive, class T>
-BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
- basic_iarchive & ar,
- void * & x,
- const unsigned int file_version
-) const
-{
- Archive & ar_impl =
- boost::serialization::smart_cast_reference<Archive &>(ar);
-
- auto_ptr_with_deleter< T > ap(heap_allocator< T >::invoke());
- if(NULL == ap.get())
- boost::serialization::throw_exception(std::bad_alloc()) ;
- T * t = ap.get();
- x = t;
-
- // catch exception during load_construct_data so that we don't
- // automatically delete the t which is most likely not fully
- // constructed
- BOOST_TRY {
- // this addresses an obscure situtation that occurs when
- // load_constructor de-serializes something through a pointer.
- ar.next_object_pointer(t);
- boost::serialization::load_construct_data_adl<Archive, T>(
- ar_impl,
- t,
- file_version
- );
- }
- BOOST_CATCH(...){
- ap.release();
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
-
- ar_impl >> boost::serialization::make_nvp(NULL, * t);
- ap.release();
-}
-#endif
// note: BOOST_DLLEXPORT is so that code for polymorphic class
// serialized only through base class won't get optimized out
template<class Archive, class T>
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