Snappy doesn't close file after work

Good day!

In Python3 I download full resolution (FR) images, crop them to a region of interest and would like to delete FR afterwards but I was not able to do it, because snappy (or SNAP) keeps a connection to Product open.

Is there a possibility to close a product explicitly?

Thank you.

You can call Product.dispose() explicitly.
This should actually work. But I know in some cases, this is not correctly implemented and the files are not released.

Super! That works!
Thank you very much, Marco!

Good day,

I’m not that sure that it’s a snappy problem but in case.
I download and process images in a for-loop and memory usage growths dramatically. I suppose that is because of that open connections.
How can I tackle with it?