title: MATLAB's Garbage Collector?
body: <p>What is your mental model of it? How is it implemented? Which strengths and weaknesses does it have? <strike>MATLAB GC vs. Python GC</strike>?</p>
  
  <p>I sometimes see strange performance bottlenecks when using MATLAB nested functions in otherwise innocuously looking code, I am sure it is because of GC. Garbage Collector is an important part of VM and Mathworks does not make it public.</p>
  
  <p>My question is about MATLAB's own <b>heap</b> and GC! Not about handling of Java/COM objects / preventing "out of memory" errors / allocation of stack variables.</p>
  
  <p><strong>EDIT:</strong> the first response is actually the meta-answer "Why should I care?". I do care because GC manifests itself when implementing <a href="https://stackoverflow.com/questions/1413860/matlab-linked-list">linked list</a> or <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" rel="noreferrer">MVC</a> pattern.</p>