R
Randolph Neall
If I take a complex reference object and make it the key of a hash table,
can I be sure that the hash of that object will always remain the same
throughout the life of that object?
Every reference object has a reference pointer that is, I would guess, some
integer. If I'm right, that integer is what gets hashed when you make such
an object a key in a hash table. If I'm right, is that integer guaranteed to
be immutable throughout the life of the object, or does garbage collection
cause a change in this integer, such that the same object now has a new
reference number?
My concern is that if this reference integer does not remain constant,
entries in the Hashtable could become invalid.
Randy Neall
can I be sure that the hash of that object will always remain the same
throughout the life of that object?
Every reference object has a reference pointer that is, I would guess, some
integer. If I'm right, that integer is what gets hashed when you make such
an object a key in a hash table. If I'm right, is that integer guaranteed to
be immutable throughout the life of the object, or does garbage collection
cause a change in this integer, such that the same object now has a new
reference number?
My concern is that if this reference integer does not remain constant,
entries in the Hashtable could become invalid.
Randy Neall