Loading...
 

CX_GARBAGE_MANAGER::Register

CX_GARBAGE_MANAGER::Register

213014
Description:

Registers an object, collection, or vector with the garbage collection. This means that as soon as the registered element is no longer referenced by any variable, collection, or vector, it is deleted. The object can be deregistered using Deregister.

This method is intended to securely delete objects created by CreateTransObject(,KEEP) as an alternative to DeleteObject, which additionally marks the object as logically deleted, or KillObject, which deletes the object immediately.

Persistent objects cannot be registered with the GarabageCollection.

Code example:
  Var(dt)  CreateTransObject(CX_DATE,KEEP) -> dt  dt GetManager(GARBAGE) Call(Register)  
Stack
Stack Position Object type Brief description
Stack(In) Top CX_GARBAGE_MANAGER Garbage manager object
top one Object | Collection | Vector The transient element to be recorded
Function call: Call(Register)