Interface ISessionObjects
The object lifetime manager of an execution session: creates instances and tracks their roots and reference counts.
public interface ISessionObjects
Methods
AddRef(VBRuntimeObjectId, IBindingHandle)
Records a new reference (root) to an instance.
void AddRef(VBRuntimeObjectId instance, IBindingHandle handle)
Parameters
instanceVBRuntimeObjectIdhandleIBindingHandle
CreateObject()
Creates a new object instance and returns its identity.
VBRuntimeObjectId CreateObject()
Returns
RemoveRef(VBRuntimeObjectId, IBindingHandle)
Drops a reference to an instance and returns the remaining reference count.
int RemoveRef(VBRuntimeObjectId instance, IBindingHandle handle)
Parameters
instanceVBRuntimeObjectIdhandleIBindingHandle
Returns
TryRemoveObject(VBRuntimeObjectId)
Removes an instance whose reference count has reached zero.
bool TryRemoveObject(VBRuntimeObjectId instance)
Parameters
instanceVBRuntimeObjectId