JNI global refs

Cedric Berger cedric@wireless-networks.com
Tue Jul 24 11:47:00 GMT 2001


> Jeff> The ref_table will store only one instance of this class.
> Jeff> I think ref_table should hash its objects by address, or something...
>> I've been thinking about this recently.
> I agree with what you say.
> We need to use object identity, and not equals() or hashCode(), as the
> basis for comparisons here.
>> One way we could do this is to make a copy of Hashtable which uses,
> say, System.identityHashCode and `=='. This would mean copying a lot
> of code though. I'm reluctant to do this.

JDK 1.4 defines such a hashtable:
 http://java.sun.com/j2se/1.4/docs/api/java/util/IdentityHashMap.html
Cedric


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /