Skip to content

Commit

Permalink
ArrayCache: use custom Key type to circumvent interning
Browse files Browse the repository at this point in the history
Because the JVM caches Integer objects, if Integer is useed as the key
of a weak HashMap, some entries will never be released. This commit
changes to use a ArrayCacheSizeKey type, which does not have interning.
This is prefered to creating unique Integer instances with `new` as this
constructor is deprecated.

fixes #484
  • Loading branch information
wirew0rm committed Jul 18, 2022
1 parent 770228b commit 59f9d6b
Showing 1 changed file with 103 additions and 71 deletions.
Loading

0 comments on commit 59f9d6b

Please sign in to comment.