MCPcopy Create free account
hub / github.com/java-native-access/jna / close

Method close

src/com/sun/jna/NativeLibrary.java:687–708  ·  view source on GitHub ↗

Close the native library we're mapped to.

()

Source from the content-addressed store, hash-verified

685
686 /** Close the native library we're mapped to. */
687 public void close() {
688 Set<String> keys = new HashSet<>();
689 synchronized(libraries) {
690 for (Map.Entry<String, Reference<NativeLibrary>> e : libraries.entrySet()) {
691 Reference<NativeLibrary> ref = e.getValue();
692 if (ref.get() == this) {
693 keys.add(e.getKey());
694 }
695 }
696
697 for (String k : keys) {
698 libraries.remove(k);
699 }
700 }
701
702 synchronized(this) {
703 if (handle != 0) {
704 handle = 0;
705 cleanable.clean();
706 }
707 }
708 }
709
710 @Deprecated
711 public void dispose() {

Callers 2

disposeAllMethod · 0.95
disposeMethod · 0.95

Calls 5

getValueMethod · 0.65
cleanMethod · 0.65
getMethod · 0.45
addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected