"As variables lose scope, they will be eligible for garbage collection. If they are scoped globally, then they will not be eligible for collection until the global namespace loses scope..."
In languages like C++ or Delphi, naming conflicts between libraries can easily be solved: If there are identical names in different libraries, the name can be qualified by adding the library name:
- libA defines myVariable
- libB defines myVariable
Your app can use libB.myVariable or libA.myVariable or myVariable, if no conflict occured - Simple solution