TimurMahammadov / google-collections

Automatically exported from code.google.com/p/google-collections
Apache License 2.0
0 stars 0 forks source link

Why doesnt ReferenceMap support Phantom references? #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I really need to use PhantomReferences as keys in ReferenceMap, but it 
doesn not seem to support them.

Is there a technical reason why that is so?

Prashant

Original issue reported on code.google.com by prashant...@gmail.com on 19 Nov 2008 at 8:24

GoogleCodeExporter commented 9 years ago
PhantomReference.get() always returns null, so there would be no way to compare 
the
keys. What are you trying to do?

Original comment by crazybob...@gmail.com on 19 Nov 2008 at 6:14

GoogleCodeExporter commented 9 years ago
I am instrumenting classes and collecting data about their objects till they 
are 
GC'd. Using a WeakReference means I cant collect any data on the finalize() 
method.

Original comment by prashant...@gmail.com on 4 Dec 2008 at 9:29

GoogleCodeExporter commented 9 years ago
Sounds like you want to use FinalizablePhantomReference directly.

Original comment by crazybob...@gmail.com on 4 Dec 2008 at 7:42

GoogleCodeExporter commented 9 years ago

Original comment by kevin...@gmail.com on 9 Jan 2009 at 4:04