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

Using static final un-modifiable List of field names for structure(s) #574

Merged
merged 1 commit into from
Jan 10, 2016

Conversation

lgoldstein
Copy link
Contributor

Avoid creating new instances for what basically is an un-modifiable static value.

Note(s):

  • I have not converted all the Structure(s) - though I believe I covered the vast majority
  • I have not run all the platform tests - but did run quite a few of them to be reasonably confident
  • There are many (many many many) changes - I believe I have not made an error, but would appreciate some extra pair of eyes - at least samples...

@lgoldstein lgoldstein force-pushed the static-structure-fields branch from 864bbdc to a0e64d7 Compare January 5, 2016 13:18
@lgoldstein lgoldstein force-pushed the static-structure-fields branch from a0e64d7 to 898e686 Compare January 5, 2016 13:24
@twall
Copy link
Contributor

twall commented Jan 7, 2016

LGTM, at least spot checking.

@lgoldstein
Copy link
Contributor Author

Let me know if you feel it is OK to merge this (or do it yourself).

twall added a commit that referenced this pull request Jan 10, 2016
Using static final un-modifiable List of field names for structure(s)
@twall twall merged commit ba18b38 into java-native-access:master Jan 10, 2016
@lgoldstein lgoldstein deleted the static-structure-fields branch January 10, 2016 10:28
mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
Motivation:

We should use weak references to hold global references to our own
classes as otherwise it will be not possible to unload the classloader.

Modifications:

Use weak references for the classes in JNI.

Result:

Related to netty/netty#13480
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