A method for removing residual data from a computer program stack prior to
returning control to a calling or controlling process with system and
method for automatic inclusion thereof into software application programs
at the time of production of executable code. Two methods, one for
removing residual data from a relatively small stack frame and another for
removing residual data from a large stack frame, are automatically
inserted into application program code during an enhanced compiling
method. Two compiler controls allow a software designer to globally
include the stack cleaning feature in all code being produced, or to
selectively include the stack cleaning feature into certain indicated
modules, code areas, or procedures.