Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix leak of gc's in gtkagg backend #1485

Merged
merged 1 commit into from

3 participants

@cmichal2

The gtkagg backend creates gc's with gdk_gc_new, but never destroyed them. This commit adds a matching gdk_gc_destroy to fix the memory leak.

@dmcdougall
Collaborator

Looks good to me.

@mdboom
Owner

Agreed. Merging. This definitely belongs on the 1.2.x maintenance branch (as you have done). Thanks.

@mdboom mdboom merged commit 1513f4a into matplotlib:v1.2.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 11, 2012
  1. @cmichal2
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/_gtkagg.cpp
View
2  src/_gtkagg.cpp
@@ -1,3 +1,4 @@
+
/* -*- mode: c++; c-basic-offset: 4 -*- */
#include <pygobject.h>
@@ -121,6 +122,7 @@ class _gtkagg_module : public Py::ExtensionModule<_gtkagg_module>
destbuffer,
deststride);
+ gdk_gc_destroy(gc);
if (needfree)
{
delete [] destbuffer;
Something went wrong with that request. Please try again.