Snappy not freeing memory

Dear @MarkWilliamMatthews, @marpet
Do you confirm that you can release memory with product.dispose() after product = ProductIO.readProduct(file) and product.getBand(‘bandname’).readPixels(…) ?

From my side, it is still ineffective.

For our activities, it would be miraculous to have a working dispose() function like this:

product = ProductIO.readProduct(file)
bands = product.getBandNames()
w, h = product.getSceneRasterWidth(),product.getSceneRasterHeight()
arr = np.empty((len(bands),w,h))
for i,band in enumerate(bands):
     # load raster
     product.getBand(band).readPixels(0,0,w,h,arr[i,...])
     # release memory of the given band
     product.getBand(band).dispose()

Best,
Tristan

1 Like