Next: Step By Step Imperative Program Execution Example, Previous: Step By Step Imperative Program Execution Rationale, Up: Step By Step Imperative Program Execution [Index]
No temporaries disposal is carried out by the step by step program executors. The application would carry it out, together with any other keeping clean task in between the instruction execution.
Consider an application that needs to provide functions that allocate resources that have no use but the immediate one. Like for an instance the formatted representation of some data needing display. One might like to write:
display(format(data));
In such instance, the ‘format’ function will likely allocate some space for the formatted representation of ‘data’. Such formatted representation is of no use as soon as ‘display’ completes execution. Call the formatted representation a temporary since it is not recorded with the program data. Call the deallocation of such temporary resources temporaries disposal.
The applications providing for functions creating temporaries will like to free the allocated resource as soon as possible. By recording the temporaries with some immediate deallocation mechanism and executing programs step by step, the interested applications will be provided with the required temporaries disposal opportunity.
See Temporaries.
For the first execution model, the one not making use of an explicit execution context, interrupting execution may require an explicit clearing of retained resources.
See x1f4_flat_program.