title: Heap Generation 2 and Large Object Heap climbs
body: <p>I am not sure if I am posting to the right StackOverFlow forum but here goes.</p>
  
  <p>I have a C# desktop app.  It receives images from 4 analogue cameras and it tries to detect motion and if so it saves it.</p>
  
  <p>When I leave the app running say over a 24hr cycle I notice the Private Working Set has climbed by almost 500% in Task manager.</p>
  
  <p>Now, I know using Task Manager is not a good idea but it does give me an indication if something is wrong.</p>
  
  <p>To that end I purchase dotMemory profiler from JetBrains.</p>
  
  <p>I have used its tools to determine that the Heap Generation 2 increases a lot in size. Then to a lesser degree the Large Object Heap as well.</p>
  
  <p>The latter is a surprise as the image size is 360x238 and the byte array size is always less than 20K.</p>
  
  <p>So, my issues are:</p>
  
  <p>Should I explicitly call GC.Collect(2) for instance?
  Should I be worried that my app is somehow responsible for this?</p>