purge() updating, abstract;
The purge method of the Collection class deletes all objects in a collection and clears the collection; that is, size = 0.
The objects that are removed are physically deleted.
The purge operation ignores object not found exceptions, which enables you to fix manually maintained collections that have references to objects that are now deleted.
The following example shows the use of the purge method.
buttonUnload_click(btn: Button input) updating; begin // Deletes the data and unloads the form. statusLine1.caption := "Deleting data..."; statusLine1.refreshNow; beginTransaction; if self.numbers <> null then NumberDict.instances.purge; Number.instances.purge; endif; commitTransaction; self.unloadForm; end;