diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-05 00:59:54 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-05 00:59:54 +0200 |
commit | 419af8264579ebbfe6c350010697771f5c800ee9 (patch) | |
tree | 7fe02aec1daac46c258efc519dcab9ba19efd016 /gtk2_ardour | |
parent | e52bdc55ad9334a4038419463596ff0ad1a42357 (diff) |
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.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/port_matrix_component.cc | 4 |
1 files 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); |