Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74520 - in sandbox-branches/geometry/index: boost/geometry/extensions/index/rtree tests
From: adam.wulkiewicz_at_[hidden]
Date: 2011-09-22 14:30:18


Author: awulkiew
Date: 2011-09-22 14:30:17 EDT (Thu, 22 Sep 2011)
New Revision: 74520
URL: http://svn.boost.org/trac/boost/changeset/74520

Log:
fixed: memory leak in rtree destructor
Text files modified:
   sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp | 3 +++
   sandbox-branches/geometry/index/tests/main.cpp | 6 +++---
   2 files changed, 6 insertions(+), 3 deletions(-)

Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp 2011-09-22 14:30:17 EDT (Thu, 22 Sep 2011)
@@ -75,6 +75,9 @@
     {
         detail::rtree::visitors::destroy<value_type, options_type, translator_type, box_type> del_v;
         detail::rtree::apply_visitor(del_v, *m_root);
+
+ // TODO: awulkiew - move this into the destroy visitor?
+ detail::rtree::delete_node(m_root);
     }
 
     template <typename Predicates, typename OutIter>

Modified: sandbox-branches/geometry/index/tests/main.cpp
==============================================================================
--- sandbox-branches/geometry/index/tests/main.cpp (original)
+++ sandbox-branches/geometry/index/tests/main.cpp 2011-09-22 14:30:17 EDT (Thu, 22 Sep 2011)
@@ -17,15 +17,15 @@
     ::srand( (unsigned)::time(NULL) );
 }
 
-//#define TEST_PRINT_INFO
+#define TEST_PRINT_INFO
 
 #include <tests/translators.hpp>
 #include <tests/rtree_function.hpp>
-//#include <tests/rtree_filters.hpp>
+#include <tests/rtree_filters.hpp>
 
 BOOST_AUTO_TEST_CASE( last_test_case )
 {
- //tests_rtree_filters_hpp();
+ tests_rtree_filters_hpp();
 
 #ifdef _MSC_VER
     std::cin.get();


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