Skip to content

significant memory leak when maxImageCachePercentage > 0 #15

@martyvona

Description

@martyvona

I am pretty sure that you need to set imageReaderCache = null before TileBuilderTask.compute() returns. As it is, the four tasks created around line 205 in TileBuilder.java will all hold references to their imageReaderCache instances simultaneously, effectively using 4 times the intended amount of memory.

All their descendant tasks will also reference those imageReaderCache instances too, and the ForkJoinPool will apparently continue to reference all the tasks, even after they are done computing. Which is why I suggest this be solved by setting imageReaderCache = null individually for each task just before TileBuilderTask.compute() returns.

this only matters if maxImageCachePercentage > 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions