Re: Python FU Scripting -- Memory Leak? or How to release python gimp objects properly to manage memory usage?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12-02-15 11:42 PM, Tom Vrankar wrote:
Here's the simple command sequence that demonstrates the "leak".
[snip]
img =gp.gimp_image_new (1280, 720, 0)
dsp =gp.gimp_display_new (img)
lyr =gp.gimp_layer_new_from_drawable (src.layers[1], img)
img.insert_layer (lyr, position =0)
gp.gimp_display_delete (dsp)

I see memory use jump after each iteration. Any help is appreciated.

You are creating and destroying the display but you aren't doing the same with the image. You should call gimp_image_delete() after you call gimp_display_delete once you no longer need the image.

--
Cheers!

Kevin.

http://www.ve3syb.ca/           |"Nerds make the shiny things that distract
Owner of Elecraft K2 #2172      | the mouth-breathers, and that's why we're
                                | powerful!"
#include <disclaimer/favourite> |             --Chris Hardwick
_______________________________________________
gimp-developer-list mailing list
gimp-developer-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gimp-developer-list


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux