First of all, please disregard Solution 1. Unfortunately, this member has no clue on this and some related topics.
And please see my comment to the question: there is no such thing as "global variable" in .NET (and this is so-o good!).
Don't worry, it cannot cause a memory leak in principle. Memory use in managed systems is controlled by the Garbage Collection. It comes into play when some object becomes
unreachable. This is explained in more detail here:
http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29[
^].
That said, it does not mean that memory leaks are impossible in managed systems. They are possible! However, "accidental" memory leak are mostly prevented. The memory leaks people really create are more of the wrong general design of the code. I explained it in my past answers:
Memory leak in WPF DataBinding[
^],
Memory management in MDI forms[
^],
Best way to get rid of a public static List Causing an Out of Memory[
^],
deferring varirable inside the loop can cuase memory leak?[
^],
Garbage collectotion takes care of all the memory management[
^].
—SA