title: Caliburn.Micro Dispose ViewModel when closed
body: <p>In a WPF application I'm using caliburn.micro and a tabbed interface to open and close multiple views.</p>
  
  <pre><code>Conductor&lt;Screen&gt;.Collection.OneActive
  </code></pre>
  
  <p>When I'm open new tabs (views), I can see the consumed memory for the exe process is increasing, that is obvious.</p>
  
  <p>But when I'm closing the tabs(views), the consumed memory is still same.  Which means consumed memory for the closed <code>ViewModels</code> are not garbage collected yet. (I have waited for long time to observe this).</p>
  
  <p>Initially the application size was ~60000K after opening many tabs (around 20) Its increased to ~500000k. My <code>ViewModels</code> are fairly heavy. Once  I closed all the tabs the the consumed memory is still ~500000k.</p>
  
  <p>I think I have to implement <code>IDisposable</code> interface for dispose <code>ViewModels</code> when it closes.</p>
  
  <ol>
  <li>Can any one help me to solve this issue by providing sample code?   </li>
  <li>Do I need to call <code>Dispose()</code> method inside overrided <code>OnDeactivate(bool close)</code> Method? </li>
  <li>Do I need to set Properties of the <code>ViewModel</code> to <code>null</code>?</li>
  </ol>