Optimizing Performance
All methods described on this page are optional. Usually, the userdoes not need to deal with them. However, in certain edge cases, they can be of good help, in order to minimize resource usage to the most possible extent.
Limiting Memory Usage
While
In this case, the loop body should be enclosed by another using block. This ensures that every single iteration of the loop does not use more memory than really needed:
The scope created by the '
But there even exists an easy way to dispose all memory immediately during the run of the function: only assign arrays to local variables by using the
However, the code obviously becomes more clumsy and precautions have to be taken, in order to prevent