id summary reporter owner description type status milestone component version severity resolution keywords cc 9166 Memory leak when copying empty boost::container::vector onlyone@… Ion Gaztañaga "Consider the following simple program: {{{ #include int main() { while (true) { boost::container::vector vec; boost::container::vector vec2(vec); } } }}} With Boost 1.54.0, this leaks an unbounded amount of memory. The copy contructor of `boost::container::vector` performs an allocation (which in this case asks for 0 bytes), and sets the capacity of the new vector the size of this allocation (0 elements), and since the capacity is 0, the destructor of vec2 does not deallocate this memory. A simple patch is attached which disables allocation when the requested size is 0. This may not be the optimal solution (for example, there might be code that subsequently reads from `m_start` and expects it to contain a valid value (I have not yet studied the code sufficiently to know)). Even so, this is a major issue, and so I am reporting it even without a fully tested patch. Evan Wallace" Bugs closed To Be Determined container Boost 1.54.0 Problem fixed