demcoreg icon indicating copy to clipboard operation
demcoreg copied to clipboard

Memory stacking up when looping the dem_align main function

Open LaTortueSolitaire opened this issue 1 year ago • 0 comments

Hi,

I noticed when making a loop to run the dem_align.main() on many files the memory usage keeps increasing.

It seems to be due to the plots that are never closed. Adding a matplotlib.pyplot.close('all') at the end of the main function does the trick.

Might be worth looking into to close each plot as soon as they are not needed to improve the memory usage even when running it only once as the plots seems to be quite memory intensive.

LaTortueSolitaire avatar Oct 11 '23 21:10 LaTortueSolitaire