Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions create-export-package-metadata-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
11 changes: 5 additions & 6 deletions src/com/sun/jna/Memory.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
*/
package com.sun.jna;

import com.sun.jna.internal.Cleaner;
import com.sun.jna.internal.ConcurrentLongHashMap;

import java.io.Closeable;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.sun.jna.internal.Cleaner;

/**
* A <code>Pointer</code> to memory obtained from the native heap via a
Expand All @@ -53,8 +52,8 @@
*/
public class Memory extends Pointer implements Closeable {
/** Keep track of all allocated memory so we can dispose of it before unloading. */
private static final Map<Long, Reference<Memory>> allocatedMemory =
new ConcurrentHashMap<>();
private static final ConcurrentLongHashMap<Reference<Memory>> allocatedMemory =
new ConcurrentLongHashMap<>();

private static final WeakMemoryHolder buffers = new WeakMemoryHolder();

Expand Down
Loading
Loading