IObjectContainer.

Deactivate(Object, int) Method

Summary

Deactivates a stored object by setting all members to null.
Assembly
Db4objects.Db4o-2010.dll
Namespace
Db4objects.Db4o
Containing Type
IObjectContainer

Syntax

void Deactivate(Object obj, int depth)

Remarks

Deactivates a stored object by setting all members to null.

Primitive types will be set to their default values. The method has no effect, if the passed object is not stored in the object container.

Be aware that calling may have side effects, which assume that a object is filled with data.

In general you should not deactivate objects, since it makes you application more complex and confusing. To control the scope of objects you should use session containers for your unit of work. Use Db4objects.Db4o.IObjectContainer.Ext.Db4objects.Db4o.Ext.IExtObjectContainer.OpenSession to create a new session.

Parameters

Name Type Description
obj Object the object to be deactivated.
depth int the member Db4objects.Db4o.Config.IConfiguration.ActivationDepth(System.Int32) the object-graph depth up to which object are deactivated

Return Value

Type Description
void

See Also

  • Db4objects.Db4o.Ext.IObjectCallbacks
  • Db4objects.Db4o.Config.IConfiguration.ActivationDepth(System.Int32)