title: Garbage Collection in Java with Recursive Function
body: <p>I know that objects become unreachable and marked for garbage collection in every iteration of a regular loop. What about recursive calls? Something like:</p>
  
  <pre class="lang-java prettyprint-override"><code>public void doWork() {
  
      Object a = new Object();
  
      ....some work with a...
  
      this.sleep(60000);
      doWork();
  
  
    }
  </code></pre>
  
  <p>Is the object (i.e. 'a') in the first recursion marked for garbage collection once the second recursion begins or does it need to be explicitly marked null since the outer function never finishes because of the recursion.  </p>