title: OpenCV cv::Mat release for free Memory
body: <p>I try to release from memory an image cv::Mat but with poor results.
  Before the creation of the image, Memory is 20,3 MB</p>
  
  <pre><code>cv::Mat image = [self cvMatWithImage:originalUIImage];
  </code></pre>
  
  <p>Now Memory is 54,3 MB..and in next line, for testing, i release the cv::Mat</p>
  
  <pre><code>image.release();
  </code></pre>
  
  <p>I see that memory is 37,2 MB, why?</p>
  
  <p>Method cvMatWithImage :</p>
  
  <pre><code>- (cv::Mat)cvMatWithImage:(UIImage *)image
  {
      CGColorSpaceRef colorSpace = CGImageGetColorSpace(image.CGImage);
      CGFloat cols = image.size.width;
      CGFloat rows = image.size.height;
  
      cv::Mat cvMat(rows, cols, CV_8UC4); // 8 bits per component, 4 channels
  
      CGContextRef contextRef = CGBitmapContextCreate(cvMat.data,                 // Pointer to backing data
                                                      cols,                       // Width of bitmap
                                                      rows,                       // Height of bitmap
                                                      8,                          // Bits per component
                                                      cvMat.step[0],              // Bytes per row
                                                      colorSpace,                 // Colorspace
                                                      kCGImageAlphaNoneSkipLast |
                                                      kCGBitmapByteOrderDefault); // Bitmap info flags
  
      CGContextDrawImage(contextRef, CGRectMake(0, 0, cols, rows), image.CGImage);
      CGContextRelease(contextRef);
  
      return cvMat;
  }
  </code></pre>