# HG changeset patch # User Chris Cannam # Date 1468413851 -3600 # Node ID 36a981a0fa31061a142e95972fa5190322810c81 # Parent 1364cbf4453d5ce32632ede9cfaa806ea232b8db Delete renderers diff -r 1364cbf4453d -r 36a981a0fa31 layer/Colour3DPlotLayer.cpp --- a/layer/Colour3DPlotLayer.cpp Wed Jul 13 13:30:39 2016 +0100 +++ b/layer/Colour3DPlotLayer.cpp Wed Jul 13 13:44:11 2016 +0100 @@ -79,6 +79,8 @@ delete m_cache; delete m_peaksCache; //!!! this one is to go... delete m_peakCache; + + cacheInvalid(); //!!! dup with above? } void @@ -130,6 +132,13 @@ m_peaksCache = 0; m_cacheValidStart = 0; m_cacheValidEnd = 0; + + //!!! + for (ViewRendererMap::iterator i = m_renderers.begin(); + i != m_renderers.end(); ++i) { + delete i->second; + } + m_renderers.clear(); } void diff -r 1364cbf4453d -r 36a981a0fa31 layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Wed Jul 13 13:30:39 2016 +0100 +++ b/layer/SpectrogramLayer.cpp Wed Jul 13 13:44:11 2016 +0100 @@ -132,6 +132,7 @@ SpectrogramLayer::~SpectrogramLayer() { + invalidateImageCaches(); invalidateFFTModel(); }