From 3bc9281c312ec237b6365c023c5ef060f5788a6b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 7 Mar 2019 16:40:16 +0100 Subject: Fix some Gtk::Menu related memory leaks A Gtk::manage()d widget will be deleted when its parent container is destroyed. Top-level context menus are not inside a container and hence need to be manually deallocated. This adds explicit delete calls for menus where there is a member variable reference to the Menu. --- gtk2_ardour/audio_clock.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'gtk2_ardour/audio_clock.cc') diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 2656c2b445..329b2fb321 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -127,6 +127,7 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string& AudioClock::~AudioClock () { + delete ops_menu; delete foreground_attr; delete editing_attr; } -- cgit v1.2.3