In short: no
However, you should avoid having large variables arrays, lists, etc. that you do not use. As the global variables will always have a reference to them, the garbage collector doesn't destroy them (as mentioned before), so they keep occupying memory unless you clear them yourself (for example by setting them to null).
If you need the functionality (and the values contained in the variables), it doesn't really matter where you define them, just know that you have to delete them (variableRef = null) if you dont need them anymore...