Skip to content

Memory leak #59

Description

@jessjaco

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions