[kaffe] Re: Implementing NewWeakGlobalRef
tromey at redhat.com
Mon Jun 27 09:28:24 PDT 2005
>>>>> "Dalibor" == Dalibor Topic <robilad at kaffe.org> writes:
>> So, I am proposing to add an unvailing macro which will detect and
>> decode weak reference. This macro should be called in all functions and
>> on all parameters that represent object references (except array entries
>> I think).
>> This will however add some cost to each JNI call but I don't yet see how
>> to implement it another cheap way.
>> Any other idea ?
I couldn't think of one. Note that JNI weak references are not the
same as Java WeakReferences; you need a new class. We have one in
libgcj (gnu.gcj.runtime.JNIWeakRef), but IMO it would be nice to share
Dalibor> Sounds good to me. gcj calls a similar inline funciton in
Dalibor> jni.cc unwrap, maybe we culd reuse the convention?
Note that there is a PR filed against libgcj in this area:
I think this probably won't affect your approach.
More information about the kaffe