Class_destroyThis

Homepage

Dynamically destroys the specified Class object.

Result := Class_destroyThis(ClassObject)

Parameters

ClassObject The Class object to use for the current operation.

Return Value

True (1) if the object was actually destroyed,
or False (0) if the previous object still exists (see 1 below).

Remarks

The object will not be destroyed if:

  1. The lock count for ClassObject is more than one. In this case, the lock count for ClassObject will be decreased by one, and the function returns false to indicate that the object still exists.
  2. ClassObject is NULL (0 or blank) - returns the empty string to indicate an error.

Related

Class

Examples

;Creates a new Array (of length 10)
myArray := Array_new(10)

;Destroys myArray and frees its memory
Result := Class_destroyThis(myArray)

;Creates a new Vector with the default parameters.
myVector := Vector_new()

;Destroys myVector and frees its memory
Result := Class_destroyThis(myVector)

Homepage