title: C# Garbage Collector behavior
body: <p>We have an application in C# that controls one of our device and reacts to signal this device gives us.</p>
  
  <p>Basically, the application creates threads, treat operations (access to a database, etc) and communicates with this device.</p>
  
  <p>In the life of the application, it creates objects and release them and so far, we're letting the Garbage Collector taking care of our memory. i've read that it is highly recommanded to let the GC do its stuff without interfering.</p>
  
  <p>Now the problem we're facing is that the process of our application grows ad vitam eternam, growing by step. Example:</p>
  
  <p><img src="https://i.stack.imgur.com/zKz9Z.png" alt="enter image description here"></p>
  
  <p>It seems to have  "waves" when the application is growing and all of a sudden, the application release some memory but seems to leave memory leaks at the same time.</p>
  
  <p>We're trying to investigate the application with some memory profiler but we would like to understand deeply how the garbage Collector works.</p>
  
  <ul>
  <li>I've found an excellent article here : <a href="http://www.simple-talk.com/dotnet/.net-framework/the-dangers-of-the-large-object-heap/" rel="nofollow noreferrer">The Danger of Large Objects</a></li>
  <li>I've also found the official documentation here : <a href="http://msdn.microsoft.com/en-us/library/0xy59wtx.aspx" rel="nofollow noreferrer">MSDN</a></li>
  </ul>
  
  <p>Do you guys know another really really deep documentation of GC?</p>
  
  <p><strong>Edit :</strong></p>
  
  <p>Here is a screenshot that illustrates the behavior of the application :</p>
  
  <p>You can clearly see the "wave" effect we're having on a very regular pattern.</p>
  
  <p>Subsidiary question :</p>
  
  <p>I've seen that my GC Collection 2 Heap is quite big and following the same pattern as the total bytes used by my application. I guess it's perfectly normal because most of our objects will survive at least 2 garbage collections (for example Singleton classes, etc)... What do you think ?</p>