demcoreg
demcoreg copied to clipboard
Memory stacking up when looping the dem_align main function
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.