ObjectContainer.deactivate Method
deactivates a stored object by setting all members to
NULL .
[Visual Basic]
Sub deactivate( _
ByVal obj As Object , _
ByVal depth As Integer _
)
[C#]
void deactivate(
object obj ,
int depth
);
[C++]
void deactivate(
Object* obj ,
int depth
);
[JScript]
function deactivate(
Object obj ,
int depth
);
Parameters obj the object to be deactivated. depth the member depth to which deactivate is to cascade. Remarks deactivates a stored object by setting all members to
NULL .
Primitive types will be set to their default values.
Examples: ../com/db4o/samples/activate. Calls to this method save memory. The method has no effect, if the passed object is not stored in the
ObjectContainer .
deactivate() triggers the callback method
objectOnDeactivate .
Be aware that calling this method with a depth parameter greater than 1 sets members on member objects to null. This may have side effects in other places of the application.
See Also ObjectContainer Interface | com.db4o Namespace | Using callbacks | Why activation?