4.2.13 Clean Variables


The Clean command is used to initialize variables and structure fields that might contain uninitialized memory. Usually this happens when memory is allocated without clearing it. It is used in conjunction with the Drain command to manage resources; primarially memory. Resource management is a low level activity so Clean and Drain commands are not used in applications. Instead they should be contained within a Class to manage any associated memory.

Arguments on a Clean command list variables to clean according to their type. That is, initial values designated on a variable declaration are applied.


Numeric


String


Enumeration


Structure


Array


Pointer

Return and Post Condition

Drain Variables