Re: JavaBridge question
Re: JavaBridge question
- Subject: Re: JavaBridge question
- From: Rolf <email@hidden>
- Date: Mon, 30 Jun 2003 01:00:03 +0200
Ok. Thanks for your help :-)
29.06.2003 15:48:31, skrev Thomas Finley <email@hidden>:
>
On Sunday, June 29, 2003, at 05:34 AM, Rolf wrote:
>
> 1. This might be a dumb question, but is this class still a 100%
>
> "java.util.Vector" class on the Objective C side, or has it been
>
> "bridgded" to a native Objective C class ? A NSLog(@"Class=%@",[result
>
> class]) returns "java/util/Vector" so I guess not. Attempting to use
>
> it as NSMutableArray
>
> (which I guess it the class that mostly resembles Vector) does not
>
> work.
>
>
You're right, it is a "java.util.Vector". _Some_ automatic conversion
>
happens, as when passing NSString to a method that requires
>
java.lang.String, and also some primitive types like ints and the rest,
>
but otherwise you're on your own mostly.
>
>
> 2. What memory management rules apply on the Objective C side to java
>
> objects ? Can I trust Java's garbage collector 100% on Java objects
>
> that are passed on to Objective C code ?
>
>
No. Even though the object uses Java to perform methods and the rest,
>
this is a mere reference to a Java object wrapped in an genuine
>
Objective-C object, and that Objective-C wrapper object is memory
>
managed just like any other object you're used to dealing with: retains
>
and releases. :)
>
>
On the flip-side, using ObjC from Java gives you the advantages of the
>
Java GC.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.