Skip to content

Commit acf9f8d

Browse files
Merge pull request #741 from AayushSabharwal/as/weakset
fix: fix bug in `WeakCacheSet`
2 parents daf2ed9 + 86ac039 commit acf9f8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WeakCacheSets.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function getkey!(h::WeakCacheSet{K}, key::K) where K
200200
if index > 0
201201
foundkey = h.keys[index].value::Union{K, Nothing}
202202
if isnothing(foundkey)
203-
@inbounds h.keys[index] = key
203+
@inbounds h.keys[index] = WeakRef(key)
204204
return key
205205
end
206206
return foundkey

0 commit comments

Comments
 (0)