$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: xushiweizh_at_[hidden]
Date: 2008-07-19 07:55:32
Author: xushiwei
Date: 2008-07-19 07:55:31 EDT (Sat, 19 Jul 2008)
New Revision: 47594
URL: http://svn.boost.org/trac/boost/changeset/47594
Log:
issue #94:
important: bugfix - defragment::defrag!!!
Text files modified:
sandbox/memory/boost/memory.hpp | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
Modified: sandbox/memory/boost/memory.hpp
==============================================================================
--- sandbox/memory/boost/memory.hpp (original)
+++ sandbox/memory/boost/memory.hpp 2008-07-19 07:55:31 EDT (Sat, 19 Jul 2008)
@@ -89,10 +89,14 @@
swap_object(this, &o);
}
- void BOOST_MEMORY_CALL defrag() {
- defragment o;
- o.copy(*this);
- swap(o);
+ void BOOST_MEMORY_CALL defrag()
+ {
+ alloc_type alloc2;
+ alloc_type::swap(alloc2);
+
+ ContainerT data2(get_alloc());
+ data2.copy(*static_cast<const ContainerT*>(this));
+ ContainerT::swap(data2);
}
public: