Studio automatically releases the memory used by components when they are no longer used. It is not necessary to 'release' or 'clean' the components used in a method. However, there are certain components that require some kind of cleaning before ending the execution. They must be cleaned by using an 'exit' block to ensure that they are always cleaned up. For example:
do // use components here on exit // clean used components here end
Note that the code enclosed in the on exit (Java style: finally, VB style: Finally) part of the block is executed even if an exception occurs. Next, after the execution, the original exception is thrown, unless it is masked by an exception thrown in the on exit block.