Note that deletion is unconditional, regardless of whether other pointers to the Object are still in use (possibly within other Objects). A safer approach is to defer deletion, until all references to an Object have expired, by using astBegin/astEnd (together with astClone and astAnnul if necessary).
This function attempts to execute even if the AST error status is set on entry, although no further error report will be made if it subsequently fails under these circumstances.