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

Fix for resource leak on exception #917

Conversation

pavel-shelentsov
Copy link
Contributor

Due to #914 I fixed 'Improper Resource Shutdown or Release' flaw from the report.
@matthiasblaesing FYI.

@matthiasblaesing
Copy link
Member

JNA 5.0 (master) is currently targetted to have minimum java version 6. That means try-with-resource can't be used. The resource cleanup need to be explicitly coded in a finally statement.

@pavel-shelentsov pavel-shelentsov changed the title Using try-with-resources to avoid resource leak Fix for resource leak on exception Feb 5, 2018
@matthiasblaesing matthiasblaesing merged commit c333527 into java-native-access:master Feb 5, 2018
@matthiasblaesing
Copy link
Member

Thank you!

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.

2 participants