Close all open native libraries.
()
| 671 | |
| 672 | /** Close all open native libraries. */ |
| 673 | static void disposeAll() { |
| 674 | Set<Reference<NativeLibrary>> values; |
| 675 | synchronized(libraries) { |
| 676 | values = new LinkedHashSet<>(libraries.values()); |
| 677 | } |
| 678 | for (Reference<NativeLibrary> ref : values) { |
| 679 | NativeLibrary lib = ref.get(); |
| 680 | if (lib != null) { |
| 681 | lib.close(); |
| 682 | } |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | /** Close the native library we're mapped to. */ |
| 687 | public void close() { |