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 15, 2022
1 parent c0b92f6 commit 2b35ac6
Showing 1 changed file with 103 additions and 71 deletions.
Loading

0 comments on commit 2b35ac6

Please sign in to comment.