It is important that every ESL application regularly uses the “squeeze memory” statement and that the squeeze is not continually prevent by activate subroutines. Providing ESL is not in a batch style of coding, where a subroutine may always be active, this not a problem. Calling the “squeeze memory” solely in response to low memory is not always the best method of ensuring maximum use of memory. If one thinks of the ESL application as a series of logical Units of Work (LUW), there will be intervals between the LUWs when a “squeeze memory” will achieve better results. For example, if the application is used in a Telephone Call Centre, a Logical Unit of Work may be the telephone conversation with a customer. Once the conversation is complete all the information obtained during the conversation will be stored, and the supporting Windows can be deleted. At this point a “squeeze memory” will be able to recover larger amounts of memory than if randomly using during the conversation.
To ensure the maximum amount of memory is recovered during a squeeze, your application should always:
•Delete redundant dynamic regions, dialogs and controls,
•Make redundant static dialogs invisible and temporary,
•Copy a null string to all unused string variables.