title: OpenCV runs out of memory when reading video file
body: <p>This example of reading video from file with <code>cv2.VideoCapture</code> in python OpenCV runs out of memory:</p>
  
  <pre><code>import cv2
  cap = cv2.VideoCapture('file.mp4')
  while True:
      ret, frame = cap.read()
  </code></pre>
  
  <p>It takes ~300 frames at 1920x1080 before it runs out.  Tested in both OpenCV 3.0.0 beta and 2.4.8, running in latest Pythonxy on Windows 7 64-bit.</p>
  
  <p>What needs to be added to this code to make it not run out of memory but rather free each frame before reading the next frame?</p>