From 419af8264579ebbfe6c350010697771f5c800ee9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 5 Apr 2020 00:59:54 +0200 Subject: Revert "replace use of gdk_pixmap_unref() with g_object_unref" This reverts commit fdf0db02a0f16044773a9229b9c872bdd512c7a9. Even though `gdk_pixmap_unref` is deprecated, it is the correct way to free `gdk_pixmap_new` objects. This fixes a memory leak and glib warning: GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed PS. Eventually this pixmap should be replaced by a cairo surface. --- gtk2_ardour/port_matrix_component.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/port_matrix_component.cc b/gtk2_ardour/port_matrix_component.cc index c3a430875d..2cf82d355f 100644 --- a/gtk2_ardour/port_matrix_component.cc +++ b/gtk2_ardour/port_matrix_component.cc @@ -43,7 +43,7 @@ PortMatrixComponent::PortMatrixComponent (PortMatrix* m, PortMatrixBody* b) PortMatrixComponent::~PortMatrixComponent () { if (_pixmap) { - g_object_unref (_pixmap); + gdk_pixmap_unref (_pixmap); } } @@ -76,7 +76,7 @@ PortMatrixComponent::get_pixmap (GdkDrawable *drawable) /* make a pixmap of the right size */ if (_pixmap) { - g_object_unref (_pixmap); + gdk_pixmap_unref (_pixmap); } _pixmap = gdk_pixmap_new (drawable, _width, _height, -1); -- cgit v1.2.3