title: Static Methods Memory Consumption
body: <p>I have the following class with the following methods:</p>
  
  <pre><code>public class Foo
  {
     public string A {get;set;}
  
     public static Foo New(string a)
     {
        Foo newFoo = new Foo();
        newFoo.A = a;
        return newFoo;
     }
   }
  
   public class Bar
   {
     public void SomeMethod()
     {
         ...
         Foo anotherFoo = Foo.New("a");
         ....
     }
   }
  </code></pre>
  
  <p>If the Bar class creates Foo during a process using the above code, will Foo ever go out scope and get garbage collected or will Foo (because it is using a static method) continue to have a reference to variable newFoo and therefore anotherFoo will never go out of scope?</p>