We often see CLEAR commands for .NET Variables at the end of functions, for example in Codeunit 5054 "WordManagement".
The question: Why is it used? As far as I understand, local variables are cleared anyway when function ends and global functions are cleared as soon as the instance of the objects is not used anymore.
Btw: I know I seems to be good practice, but I wonder if it is really needed and what happens if not following this good practice (of course apart from the fact we'll get caught by the boegeyman)
Looking forward to your opinions.