Object Deletion
Objects are automatically deleted when a DBO variable is reassigned or goes out of scope (as in local subroutine or user function variables after the RETURN statement). In addition all objects saved in local variables are deleted when the program ends. Any DBOs saved in common or named common sections persist for the duration of the variable.
However, an object remains in existence as long as there is at least one pointer to the object.
Syntax
object = expression
Comments
As the system automatically maintains and deletes references to the objects, it is not necessary for the programmer to manually delete DBOs. However, it is good practice to delete a DBO when it is no longer needed in large complex applications, so that the object is not retained unnecessarily.
Deleting a connection object does not affect any objects using the referenced Language Server or Object Manager. The connection is not closed until all the objects using it have been deleted.
Examples
Assign the null string to the variable BankAccount, deleting anything it had in it:
BankAccount = ""