Example #1
0
 protected override bool ReleaseHandle()
 {
     try
     {
         if (handle != IntPtr.Zero)
         {
             JNIEnv env = JNIEnv.GetEnvNoThrow(javaVM);
             if (env == null)
             {
                 return(false);
             }
             env.DeleteGlobalRef(this);
         }
         return(true);
     }
     finally
     {
         handle = IntPtr.Zero;
     }
 }