JuggerNET Runtime Library v3.6.54.0  3.6.54.0
Classes | Static Public Member Functions | Static Public Attributes | List of all members
Codemesh.JuggerNET.LifeCycleManager Class Reference

The LifeCycleManager class allows a user to manage the lifecycle of .NET and related instances better. This class has become necessary because of callbacks and the requirement that both the user-written callback and the generated callback instance be available and not finalized while the Java instance is dispatching callbacks to them. More...

Static Public Member Functions

static JavaProxy keep (object obj, Type ifc)
 The method that allows a user to request that an object be kept alive and not be finalized until at least the release method is called. Typically the object being passed in will be a user's implementation of a callback interface. More...
 
static void release (object obj)
 The method that allows a user to specify that an object is now eligible for finalization. More...
 

Static Public Attributes

static int GC_THRESHOLD = -1
 

Detailed Description

The LifeCycleManager class allows a user to manage the lifecycle of .NET and related instances better. This class has become necessary because of callbacks and the requirement that both the user-written callback and the generated callback instance be available and not finalized while the Java instance is dispatching callbacks to them.

<exclude>

Member Function Documentation

◆ keep()

static JavaProxy Codemesh.JuggerNET.LifeCycleManager.keep ( object  obj,
Type  ifc 
)
inlinestatic

The method that allows a user to request that an object be kept alive and not be finalized until at least the release method is called. Typically the object being passed in will be a user's implementation of a callback interface.

Parameters
objthe object that is to be kept alive
ifcthe optional callback type that is being implemented
Returns
a proxy object that is either the passed object itself or a placeholder object in the case of callbacks.

References Codemesh.JuggerNET.JvmLoader.GetJvmLoader(), and Codemesh.JuggerNET.IJvmLoader.Load().

◆ release()

static void Codemesh.JuggerNET.LifeCycleManager.release ( object  obj)
inlinestatic

The method that allows a user to specify that an object is now eligible for finalization.

Parameters
objthe object that may now be finalized.

The documentation for this class was generated from the following file:

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.