You can delete an object (or all the objects in a class) by specifying a delete statement. Deleting an object deletes the object itself, its contents, and its children; for example:
delete Water in Liquids in Coolants
Here, Water is deleted, along with any children Water may have. Liquids and Coolants are not affected by the statement, except that Water is no longer a child of Liquids, because it no longer exists.
Before you delete an object, you must first delete the object (as well as its children) from any classes of which it is a member, using the delete from class statement described in Using Classes of Objects. If you do not, performing an action on the class will produce an error during runtime.
If you want to delete the contents and children of an object, but want to retain the object itself with all of its other attributes, use the clear statement.