diff --git a/core/circular_buffer.hh b/core/circular_buffer.hh index 9cf2bdb99a..02a6bdc5fe 100644 --- a/core/circular_buffer.hh +++ b/core/circular_buffer.hh @@ -281,6 +281,7 @@ template inline void circular_buffer::pop_front() { + _impl.destroy(&front()); ++_impl.begin; if (_impl.begin == _impl.storage + _impl.capacity) { _impl.begin = _impl.storage; @@ -292,6 +293,7 @@ template inline void circular_buffer::pop_back() { + _impl.destroy(&back()); if (_impl.end == _impl.begin) { _impl.end = _impl.storage + _impl.capacity; }