How to explore the content of the finalization registry
These are scripts for analysing the list of ephemerons from the default FinalizationRegistry
.
Note: accessing the lis of ephemerons is not thread safe. These analyses can fail in case many changes happen from other processes to the list of ephemerons
((FinalizationRegistry default gtCurrentEphemerons groupedBy: [ :each | each key class class ]) associations sorted: [ :assoc | assoc value size ] descending) asOrderedDictionary
((FinalizationRegistry default gtCurrentEphemerons groupedBy: [ :each | each key class package ]) associations sorted: [ :assoc | assoc value size ] descending) asOrderedDictionary
((FinalizationRegistry default gtCurrentEphemerons groupedBy: [ :each | each key ]) associations sorted: [ :assoc | assoc value size ] descending) asOrderedDictionary
((FinalizationRegistry default gtCurrentEphemerons groupedBy: [ :each | each value class ]) associations sorted: [ :assoc | assoc value size ] descending) asOrderedDictionary