Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp Script Memory Problem Question
#2
Can you show the actual code that loads the image, and the code that deletes it?

You can also check if according to Gimp the length of the image list (obtained by gimp.image_list() isn't increasing indefinitely).

"It should return True on success but that isn't the case." I don't see this documented in the procedure browser... For me it doesn't return anything.



Tried this:
Code:
for i in range(10):
    image=gimp.Image(30000,30000,RGB)
    layer=gimp.Layer(image,"Filler",10000,10000,RGB_IMAGE,100,NORMAL_MODE)
    image.add_layer(layer,0)
    pdb.gimp_drawable_fill(layer,FILL_PATTERN)

for image in gimp.image_list():
    print image.layers

# A bit later

for image in gimp.image_list():
    gimp.delete(image)
With my system monitor running, I definitely see a memory increase, and a final sharp drop:

   

While doing this, I found that the Image list dockable dialog displays the image thumbnails, even if they have no associated Display, so perhaps just by opening this dialog you can check if your images are adequately removed (I can see the images appear in the display one by one, and then all disappear at the end).
Reply


Messages In This Thread
RE: Gimp Script Memory Problem Question - by Ofnuts - 12-19-2021, 09:15 AM

Forum Jump: