I believe I've pinned down a memory leak that happens whenever fractional_cover._compute fractions is called iteratively within a process, either due to processing several input scenes, or using the dask processing. I believe the culprit is this pattern in fc/unmix/unmiximage_wrapper.c:
|
fractionsImage_obj = (PyArrayObject*) PyArray_FromArray(fractionsImage_obj, |
|
PyArray_DescrFromType(NPY_DOUBLE), |
|
NPY_ARRAY_C_CONTIGUOUS); |
It appears this operation does not free the memory held by the "original" fractionsImage_obj before pointing to a new object.
I will submit a PR for this momentarily. Happy to provide more evidence if needed.
I believe I've pinned down a memory leak that happens whenever
fractional_cover._compute fractionsis called iteratively within a process, either due to processing several input scenes, or using the dask processing. I believe the culprit is this pattern in fc/unmix/unmiximage_wrapper.c:fc/fc/unmix/unmiximage_wrapper.c
Lines 102 to 104 in f2a7481
It appears this operation does not free the memory held by the "original"
fractionsImage_objbefore pointing to a new object.I will submit a PR for this momentarily. Happy to provide more evidence if needed.