We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8801599 commit 7e415e7Copy full SHA for 7e415e7
src/main/java/org/truffleruby/collections/ConcurrentWeakKeysMap.java
@@ -94,10 +94,14 @@ public Value remove(Key key) {
94
return map.remove(buildWeakReference(key));
95
}
96
97
+ /** It's important a WeakReference that is built returns true for {@code ref.equals(ref)} even if the reference is
98
+ * cleared. */
99
protected WeakReference<Key> buildWeakReference(Key key) {
100
return new WeakKeyReference<>(key);
101
102
103
104
105
protected WeakReference<Key> buildWeakReference(Key key, ReferenceQueue<Key> referenceQueue) {
106
return new WeakKeyReference<>(key, referenceQueue);
107
0 commit comments