Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81351 - sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rstar
From: adam.wulkiewicz_at_[hidden]
Date: 2012-11-14 18:55:53


Author: awulkiew
Date: 2012-11-14 18:55:53 EST (Wed, 14 Nov 2012)
New Revision: 81351
URL: http://svn.boost.org/trac/boost/changeset/81351

Log:
std::vector MS implementation memory leak workaround added.
Text files modified:
   sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rstar/insert.hpp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rstar/insert.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rstar/insert.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rstar/insert.hpp 2012-11-14 18:55:53 EST (Wed, 14 Nov 2012)
@@ -63,7 +63,9 @@
         typename index::detail::rtree::container_from_elements_type<
             elements_type,
             std::pair<distance_type, element_type>
- >::type sorted_elements(elements_count); // MAY THROW (V: alloc, copy, E: alloc)
+ >::type sorted_elements;
+ // If constructor is used instead of resize() MS implementation leaks here
+ sorted_elements.resize(elements_count); // MAY THROW (V: alloc, copy, E: alloc)
         
         for ( size_t i = 0 ; i < elements_count ; ++i )
         {


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