I am trying to figure out why my GIMP plugin uses more and more RAM during it's execution. I wrote a simple test plugin to check if deleting images through pdb.gimp_image_delete
works as intended:
image_id = pdb.gimp_image_new(500, 500, RGB)
while True:
duplicate = pdb.gimp_image_duplicate(image_id)
pdb.gimp_image_delete(image_id)
image_id = duplicate
print pdb.gimp_image_list()
Image list looks fine - in every iteration pdb.gimp_image_list
shows that there is only one image, but RAM usage grows rapidly. It's close 1GB after 1 min of execution! It looks like gimp_image_delete
leaves image in memory somehow or something else is causing this. Any ideas how to solve this? I thought that it may be fault of gimp_image_duplicate
, but replacing duplicate = pdb.gimp_image_duplicate(image_id)
with image_id = pdb.gimp_image_new(500, 500, RGB)
gives the same effect. I also tried gimp.delete
function.