[mono-android] JNI Help Please
Jonathan Pryor
jonp at xamarin.com
Mon Feb 13 19:01:19 UTC 2012
Sorry for the delay...
On Feb 6, 2012, at 5:45 PM, digitalml wrote:
> So using the above code that you posted is working for me, but the constructor to my .java object is being called multiple times and is producing some strange behavior. How many instances of my java object are created with the above code?
One instance of a Java object should be created for each C# object instance (unless the (IntPtr, JniHandleOwnership) constructor is used, in which case multiple C# objects could refer to the same Java instance).
What I'd suggest you do is print out the stack trace within your jni_helper constructor to see what is creating the instance.
- Jon
More information about the Monodroid
mailing list