Terminate Event
The Terminate event is triggered for a frame when the frame is told to terminate, either by the Terminate method defined on the GhostExec object or by an ancestor frame (the frame that opened it, the frame that opened its parent, and so on) that executes a return statement.
on terminate