diff --git a/examples/BLOCKS/BlocksDrawingDemo.h b/examples/BLOCKS/BlocksDrawingDemo.h index 902a722f7c..b9d5d119a7 100644 --- a/examples/BLOCKS/BlocksDrawingDemo.h +++ b/examples/BLOCKS/BlocksDrawingDemo.h @@ -313,6 +313,8 @@ public: #endif setSize (600, 600); + + topologyChanged(); } ~BlocksDrawingDemo() @@ -321,6 +323,7 @@ public: detachActiveBlock(); lightpadComponent.removeListener (this); + topologySource.removeListener (this); } void resized() override diff --git a/examples/BLOCKS/BlocksMonitorDemo.h b/examples/BLOCKS/BlocksMonitorDemo.h index 2e1e4f3fca..2f3d02ca21 100644 --- a/examples/BLOCKS/BlocksMonitorDemo.h +++ b/examples/BLOCKS/BlocksMonitorDemo.h @@ -605,6 +605,13 @@ public: #endif setSize (600, 600); + + topologyChanged(); + } + + ~BlocksMonitorDemo() + { + topologySource.removeListener (this); } void paint (Graphics&) override {} diff --git a/examples/BLOCKS/BlocksSynthDemo.h b/examples/BLOCKS/BlocksSynthDemo.h index ba083659ee..0745c82cfa 100644 --- a/examples/BLOCKS/BlocksSynthDemo.h +++ b/examples/BLOCKS/BlocksSynthDemo.h @@ -607,12 +607,16 @@ public: #endif setSize (600, 400); + + topologyChanged(); } ~BlocksSynthDemo() { if (activeBlock != nullptr) detachActiveBlock(); + + topologySource.removeListener (this); } void paint (Graphics& g) override