Skip to content

ARM for the Java API#980

Merged
yhchiang merged 9 commits intofacebook:masterfrom
adamretter:java-arm
Mar 31, 2016
Merged

ARM for the Java API#980
yhchiang merged 9 commits intofacebook:masterfrom
adamretter:java-arm

Conversation

@adamretter
Copy link
Collaborator

ARM (Automatic Resource Management)

The purpose of these commits is to move away from relying on the Garbage Collector to call finalize on the various Objects of the Rocks Java API in order to free the underlying C++ objects and memory. Instead we will require users of the Java API to explicitly free the Java Objects, by calling close; To this end we have implemented java.lang.AutoCloseable throughout the API, which allows the user to make use of Java 7's try-with-resources.

Along the way, improvements have also been made around the Java/C++ JNI bridge with respect to object creation/initialization and destruction. These changes require thorough testing as the synchronization of object cleanup has been changed.

@yhchiang
Copy link
Contributor

Created a phabricator view of this PR. Will follow-up with comments.
https://reviews.facebook.net/D54279

@adamretter: it seems I cannot assign you as the author of D54279 directly, can you try commando that diff and see if it works?

@yhchiang yhchiang merged commit 51c9464 into facebook:master Mar 31, 2016
@yhchiang
Copy link
Contributor

LGTM. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants