public static IntPtr NewReturnToJniRef(JniObjectReference value)
            {
                if (!value.IsValid)
                {
                    return(IntPtr.Zero);
                }
                var l = value.NewLocalRef();

                return(JniEnvironment.Runtime.ObjectReferenceManager.ReleaseLocalReference(JniEnvironment.CurrentInfo, ref l));
            }
Exemplo n.º 2
0
        public JniLocalReference NewLocalRef()
        {
            var r = new JniObjectReference(DangerousGetHandle(), ReferenceType);

            return(new JniLocalReference(r.NewLocalRef().Handle));
        }