Closed
Description
Phil Webb opened SPR-11440 and commented
The restructureIfNecessary
method in ConcurrentReferenceHashMap
can add new entries Reference
objects that have been cleaned.
It appears that relying on ReferenceQueue
alone is not enough to ensure that entries get removed. An entry that has been cleaned but somehow doesn't appear as a pollForPurge
entry will be continually re-added with a null
reference.
Affects: 3.2.7, 4.0.1
Issue Links:
- memory leak in class org.springframework.core.ResolvableType [SPR-11394] #16021 memory leak in class org.springframework.core.ResolvableType
- ConcurrentReferenceHashMap does not enforce visibility of cached EntrySet [SPR-16994] #21532 ConcurrentReferenceHashMap does not enforce visibility of cached EntrySet
Referenced from: commits 2b4c81e, 09c5720
Backported to: 3.2.8