Re: [Boost-bugs] [Boost C++ Libraries] #10954: boost::spirit::iterator_policies::split_std_deque memory leak on reference count

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10954: boost::spirit::iterator_policies::split_std_deque memory leak on reference count
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-12-10 15:21:55


#10954: boost::spirit::iterator_policies::split_std_deque memory leak on reference
count
-------------------------+-------------------------------------------------
  Reporter: | Owner: Joel de Guzman
  daniel.f.starke@… |
      Type: Bugs | Status: new
 Milestone: To Be | Component: spirit
  Determined |
   Version: Boost | Severity: Problem
  1.57.0 | Keywords: iterator memory leak spirit
Resolution: | multi_pass
-------------------------+-------------------------------------------------

Comment (by Nikita Kniazev <nok.raven@…>):

 I can confirm the problem.

 `Once the iterator count goes down to one, and the queue is no longer
 needed, it is cleared, freeing up memory` - actually both of statements
 found in documentation are violated:
   1. The queue is not cleared in this case (but manual `clear_queue()`
 works)
   2. Because `split_std_deque` is actually implemented on top of
 `std::vector` it does not return memory to system upon calling `clear()`
 (the `shrink_to_fit()` call appeared only on C++11)

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/10954#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-12-10 15:28:24 UTC