Revert incorrect change to release()
authorNot Zed <notzed@gmail.com>
Sat, 25 Jan 2020 03:10:14 +0000 (13:40 +1030)
committerNot Zed <notzed@gmail.com>
Sat, 25 Jan 2020 03:10:14 +0000 (13:40 +1030)
src/notzed.zcl/classes/api/Native.java

index 5518b26..364d262 100644 (file)
@@ -737,15 +737,13 @@ public class Native {
                WeakReference<? extends Native> ref;
 
                synchronized (map) {
-                       //ref = map.remove(p);
-                       ref = map.get(p);
+                       ref = map.remove(p);
                }
 
                if (ref != null) {
                        if (dolog)
                                log().log(Level.DEBUG, () -> String.format("  force  $%016x %s", Memory.toLong(p), getClass().getName()));
 
-                       ref.clear();
                        ref.enqueue();
                }
        }