IKVM.Runtime.JNI.Frame.Leave C# (CSharp) Méthode

Leave() public méthode

public Leave ( ) : void
Résultat void
            public void Leave()
            {
                Exception x = env.Leave(prevFrameState);
                if(x != null)
                {
                    throw x;
                }
            }

Same methods

JNI.Frame::Leave ( ClassLoaderWrapper prev ) : void

Usage Example

Exemple #1
0
		private unsafe static void UnloadLibrary(long handle, ClassLoaderWrapper loader)
		{
			lock (JniLock)
			{
				Tracer.Info(Tracer.Jni, "Unloading library: handle = 0x{0:X}, class loader = {1}", handle, loader);
				IntPtr p = (IntPtr)handle;
				IntPtr onunload = ikvm_GetProcAddress(p, "JNI_OnUnload", IntPtr.Size * 2);
				if (onunload != IntPtr.Zero)
				{
					Tracer.Info(Tracer.Jni, "Calling JNI_OnUnload on: handle = 0x{0:X}", handle);
					JNI.Frame f = new JNI.Frame();
					ClassLoaderWrapper prevLoader = f.Enter(loader);
					try
					{
						// TODO on Whidbey we should be able to use Marshal.GetDelegateForFunctionPointer to call OnLoad
						ikvm_CallOnLoad(onunload, JavaVM.pJavaVM, null);
					}
					finally
					{
						f.Leave(prevLoader);
					}
				}
				nativeLibraries.Remove(p);
				loader.UnregisterNativeLibrary(p);
				ikvm_FreeLibrary((IntPtr)handle);
			}
		}
All Usage Examples Of IKVM.Runtime.JNI.Frame::Leave