Skip to content

Clp is now autocloseable, since finalize is deprecated and performanc…#19

Open
snurkabill wants to merge 1 commit intoquantego:developfrom
snurkabill:autocloseable_clp
Open

Clp is now autocloseable, since finalize is deprecated and performanc…#19
snurkabill wants to merge 1 commit intoquantego:developfrom
snurkabill:autocloseable_clp

Conversation

@snurkabill
Copy link

…e bottleneck. Keeping finalize as a fallback option.

When spamming many CLP models, the JVM finalizer thread is not able to catch up. Finalize method is considered deprecated and has no guarantees. Leading to memory leaks during computation.

AutoCloseable option provides an explicit method to free native memory. The finalizer thread has little to do and hence no memory leaks occur during computation.

Finalize method should be removed in future releases, forcing a user to explicitly release native memory or use try-wtih-resources block.

…e bottleneck. Keeping finalize as fallback option.
mmadoo added a commit to DCbrainOrg/clp-java that referenced this pull request May 18, 2022
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

Successfully merging this pull request may close these issues.

1 participant