title: Can a class that references itself in a static field be garbage collected?
body: <pre><code>public class MyClass {
    private static MyClass heldInstance;
  
    public MyClass() {
      heldInstance = this;
    }
  }
  </code></pre>
  
  <p>Assuming an instance of MyClass is not rooted in any other way, will the private static reference here prevent it from being garbage collected?</p>