From 9bd6508264e2aef1c4afb1df585ee375016789ea Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 10 Aug 2014 06:05:57 +0000 Subject: Fix memory errors when destroying graph view. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5452 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/GraphView.cpp | 5 +++++ src/gui/GraphView.hpp | 2 ++ 2 files changed, 7 insertions(+) (limited to 'src/gui') diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp index 001d1faf..48056f56 100644 --- a/src/gui/GraphView.cpp +++ b/src/gui/GraphView.cpp @@ -58,6 +58,11 @@ GraphView::GraphView(BaseObjectType* cobject, _canvas_scrolledwindow->property_vadjustment().get_value()->set_step_increment(10); } +GraphView::~GraphView() +{ + _canvas_scrolledwindow->remove(); +} + void GraphView::init(App& app) { diff --git a/src/gui/GraphView.hpp b/src/gui/GraphView.hpp index f0524673..140d5248 100644 --- a/src/gui/GraphView.hpp +++ b/src/gui/GraphView.hpp @@ -59,6 +59,8 @@ public: GraphView(BaseObjectType* cobject, const Glib::RefPtr& xml); + ~GraphView(); + void init(App& app); SPtr canvas() const { return _canvas; } -- cgit v1.2.1