Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

significant memory leak when maxImageCachePercentage > 0 #15

Open
martyvona opened this issue Oct 21, 2021 · 0 comments
Open

significant memory leak when maxImageCachePercentage > 0 #15

martyvona opened this issue Oct 21, 2021 · 0 comments

Comments

@martyvona
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant