Re: Serialization patch and question

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Wed Feb 03 1999 - 13:44:40 EST


>
> On Feb 3, 1999, Godmar Back <gback@cs.utah.edu> wrote:
>
> >> Before I start working on this, is there any chance of using default
> >> Object.equals() and Object.hashCode() methods on an object of a derived
> >> class, which redefines them as something else, besides "going native"?
>
> > I am not sure I understand everything you say, but there is
> > System.identityHashCode(Object o), which return the hashcode that would
> > be returned if Object.hashCode() is not overridden.
>
> > In Kaffe, it returns the address of the object --- which opens a whole
> > new can of worms once we'll use moving collectors.
>
> Once we start using moving collectors, we'll have to hack
> Object.hashCode() (and identityHashCode) so that they keep returning
> the same value even after the object moves. The hashcode of an object
> cannot change during its lifetime (and I'm not sure it should change
> after WriteObject | ReadObject)
>

As an aside, this is why EF stores the hashcode in the object.
Another 4 bytes per object gone.

        -- Godmar


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:56 EDT