JNI patches

Per Bothner per@bothner.com
Sat Mar 31 18:56:00 GMT 2001


mgd@swarm.org (Marcus G. Daniels) writes:
> 2. split local ref table from global ref table. The handles should be 
> unique as I understand JNI. The way it is now means that someone 
> can call DeleteGlobalRef on a local ref or vice-versa. 

I am not convinced this is needed. Does anything in the JNI prohibit the
following implementation:
* Locals refs and global refs are the same. When either refers to an
object, the ref is just a pointer to the Java object.
* NewGlobalRef is an identify operation.
* DeleteLocalRef and DeleteGlobalRef do nothing.
I'm not seeing how a valid JNI program can not work given this
implementation. I'm assuming the conservative GC will find
both local and global references assuming it normally scans
C static and local variables. Is that not the case?
-- 
	--Per Bothner
per@bothner.com http://www.bothner.com/~per/


More information about the Java mailing list

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