From ba5b21d43e5a3d3f90878c816965d749cac8a2d2 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 11 Jan 2014 19:05:09 +0000 Subject: [PATCH] Clear buffer values explicitely in destructor Buffer values could be registered as a listener, so we need to get rid of them before asserting that all listeners have been unregistered. --- src/buffer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/buffer.cc b/src/buffer.cc index 757405be..2fb1a46c 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -67,6 +67,7 @@ Buffer::~Buffer() m_options.unregister_watcher(*this); BufferManager::instance().unregister_buffer(*this); + m_values.clear(); kak_assert(m_change_listeners.empty()); }