memory leaks, 0.54.1 with .2a modifications

There does seem to be a memory problem when using Python

    > and GTK+. Have you seen the pygtk FAQ 8.4 "Is there a
    > resource leak? Why do I run out of memory using Pixbuf?"

I submitted a patch to fix a pygtk memory leak in get_image that was
incorporated into pygtk 2.2.

  Bug 133681 – memory leak in gdk.drawable.get_image

Which version are you using? Do you still see a problem with pygtk
2.2 or later?

I'll take a look at incorporating your changes, in an case.

But as Kirill pointed out, there is a separate problem with Agg that I
have to track down.

JDH

John,

I am using pygtk2.2, built and installed from the tarball on top of my existing pygtk2.0, which was installed from rpm.

The problem does not seem to be inevitable with pygtk plotting; testing I have done so far with pyStripchart 0.0.7 (http://jstripchart.sourceforge.net), also with pygtk2.2, has given no indication of a leak. It is a much more specialized (hence simpler) package, though. It draws directly to a DrawingArea instead of using a Pixmap.

Eric

John Hunter wrote:

···

"Steve" == Steve Chaplin <stevech1097@...41...> writes:
           
   > There does seem to be a memory problem when using Python
   > and GTK+. Have you seen the pygtk FAQ 8.4 "Is there a
   > resource leak? Why do I run out of memory using Pixbuf?"

I submitted a patch to fix a pygtk memory leak in get_image that was
incorporated into pygtk 2.2.

Bug 133681 – memory leak in gdk.drawable.get_image

Which version are you using? Do you still see a problem with pygtk
2.2 or later?

I'll take a look at incorporating your changes, in an case.

But as Kirill pointed out, there is a separate problem with Agg that I
have to track down.

JDH

Thanks for the link. I'm using pygtk from cvs and ran a test for myself
to check that get_image() no longer leaks memory.

I think the FAQ 8.4 reports a memory inefficiency problem, not a memory
leak. It shows a loop where you quickly allocate memory and can use a
large amount of system memory before the Python garbage collector has a
chance to free the unused memory.

Steve

···

On Tue, 2004-06-08 at 21:53, John Hunter wrote:

    > There does seem to be a memory problem when using Python
    > and GTK+. Have you seen the pygtk FAQ 8.4 "Is there a
    > resource leak? Why do I run out of memory using Pixbuf?"

I submitted a patch to fix a pygtk memory leak in get_image that was
incorporated into pygtk 2.2.

  Bug 133681 – memory leak in gdk.drawable.get_image

Which version are you using? Do you still see a problem with pygtk
2.2 or later?