Re: [Gimp-developer] Python FU Scripting -- Memory Leak? or How to release python gimp objects properly to manage memory usage?
- From: Kevin Cozens <kevin ve3syb ca>
- To: gimp-developer <gimp-developer-list gnome org>
- Subject: Re: [Gimp-developer] Python FU Scripting -- Memory Leak? or How to release python gimp objects properly to manage memory usage?
- Date: Tue, 28 Feb 2012 10:52:11 -0500
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]