Revert "replace use of gdk_pixmap_unref() with g_object_unref"
This reverts commit fdf0db02a0
.
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.
This commit is contained in:
parent
e52bdc55ad
commit
419af82645
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue