title: Can OpenCV pile up memory when high CPU usage?
body: <p>I am investigating a memory pile-up issue in my code.</p>
  
  <p>Code description:<br>
  (1) Read images from webcam in real-time.<br>
  (2) Based upon some conditions, add these images to a std::vector<br>
  (3) std::vector Passed onto another thread for writing a video file.
  (4) Resolutions tried at 720p, 540p, 360p.</p>
  
  <p>Issue:<br>
  - Memory keeps piling up, inspite of me clearing the std::vector after every .avi file write.<br>
  - Already verified that reference count of these images goes down to zero once I clear the vector.<br>
  - The above happens only when running at 720p. Not seen at 540p, 360p.  </p>
  
  <p>After investigating a lot for memory leaks, I haven't found any.</p>
  
  <p>I have noticed that this problem happens only when CPU is at 100%. Is it possible that OpenCV memory cleanup is unable to run in cases when CPU usage is very high?  Has anyboy seen similar problems?</p>
  
  <p>Any insights would be useful.<br>
  Also, would be useful to know how OpenCV triggers the routine which does memory cleanup.  </p>