As explained on the memory management page, xff stores the actual content of objects in a global variable, which means that the statement
does not have the desired effect of clearing (freeing) the memory associated with the variable (object)
obj. Instead, the memory must be freed using a class/object method (which in turn removes the object's content from the global variable).
AFT::ClearObject - remove object from global storage FORMAT: obj.ClearObject; No input / output fields. TYPES: ALL
While xff does support garbage collection, this does not affect objects that
blessed using the
Also, the garbage collection is called only when a method on any given xff object is used; so it can sometimes take a while before memory becomes available again. In general, it is highly suggested that you clear objects once you know they are no longer required to free up the memory they allocate!