dshean / demcoreg

Utilities for DEM and point cloud co-registration
MIT License
110 stars 42 forks source link

Memory stacking up when looping the dem_align main function #59

Open LaTortueSolitaire opened 11 months ago

LaTortueSolitaire commented 11 months ago

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.