N
NOBODY
(sorry for crosspost, I was mistakenly in comp.lang.java.databases)
How long lasts the unicity (if any) of the System.identityHashCode()?
I created code that keep track of seen identityhashcodes for instances
created and unreferenced in a loop.
**** I was surprised to see that these identityhashcode can be reused! ****
The language spec says noting about the unicity of those (at any given
time) and especially not for periods of tiem.
Spec menyions that most jvm would use the heap address (which would explain
why these identityhashcode could be reused)
**** The question is:
At what time is an identityhashcode invalidated and reusable?
If I have a finalize() method, at which time the object is considered
unreferenced, could its identityhashcode be reused while the finalize() is
running?
My problem is that I associated data to an object, in an external
diskcache, by a key whose value is the identityhashcode, (trying to make
the key unique), and I must garbage collect it.
How long lasts the unicity (if any) of the System.identityHashCode()?
I created code that keep track of seen identityhashcodes for instances
created and unreferenced in a loop.
**** I was surprised to see that these identityhashcode can be reused! ****
The language spec says noting about the unicity of those (at any given
time) and especially not for periods of tiem.
Spec menyions that most jvm would use the heap address (which would explain
why these identityhashcode could be reused)
**** The question is:
At what time is an identityhashcode invalidated and reusable?
If I have a finalize() method, at which time the object is considered
unreferenced, could its identityhashcode be reused while the finalize() is
running?
My problem is that I associated data to an object, in an external
diskcache, by a key whose value is the identityhashcode, (trying to make
the key unique), and I must garbage collect it.