title: JavaScript memory management pitfalls?
body: <p>I know that JavaScript has a garbage collector. Therefore, using <em>delete</em> remove only a reference to the object, and when there is no more reference to this object, it is deleted by the GC.</p>
  <p>JavaScript is tricky, with the closures, the fuzzy name space and the prototype inheritance, it's not always obvious to know when to now or why.</p>
  <p>I am coding a fairly large JavaScript project and would like to avoid memory leak, while limiting the global memory usage. I am not at all in the optimizing stage (let's get the stuff work first :-)), but it would be nice to know the good practices for memory management in order to avoid writing crappy code.</p>
  <ul>
  <li>So when should I use <em>delete</em>?</li>
  <li>What are the traps I should avoid,
  using objects?</li>
  <li>Some stuff to know about closures?</li>
  <li>Some good practices to highlight?</li>
  </ul>