I
Ian Pilcher
I have (finally!) reached the point of writing unit tests for my
WeakIdentityHashMap, and testing for proper removal of otherwise
unreachable keys is proving to be quite a problem.
Currently, my tests assume that a call to System.gc() will ensure that
all cleared WeakReferences will be enqueued, but this does not appear to
be the case.
Does this sound credible? (This is Sun's 1.5.0_06 JVM on Linux, BTW.)
If System.gc() won't do the trick, does anyone know of anyway to ensure
that all WeakReferences are actually enqueued?
TIA
WeakIdentityHashMap, and testing for proper removal of otherwise
unreachable keys is proving to be quite a problem.
Currently, my tests assume that a call to System.gc() will ensure that
all cleared WeakReferences will be enqueued, but this does not appear to
be the case.
Does this sound credible? (This is Sun's 1.5.0_06 JVM on Linux, BTW.)
If System.gc() won't do the trick, does anyone know of anyway to ensure
that all WeakReferences are actually enqueued?
TIA