title: Does a recursive setTimeout cause a stack info memory leak?
body: <p>I have the following scenario:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let func = () =&gt; {
    //...
    let id = setTimeout(() =&gt; {
      console.trace();
      clearTimeout(id);
      func();
    }, 2000);
  }
  
  func();</code></pre>
  </div>
  </div>
  </p>
  
  <p>Although I read that clearing the timeout handle will release the memory for closures and the handler itself, I am still curious if there might be a possible leak in stack information. I put the <code>console.trace()</code> call on purpose and it looks like the stack information grows indefinitely. Isn't that a concern? I know that it is not on a recursive-like stack where we might get a stack size exception but I'm still concerned about the stack information that keeps growing.</p>