title: cv::Mat from external raw pointer data, releasing itself
body: <p>is there a way of creating a <code>cv::Mat</code> from external data pointer, but making that object responsible for deleting the data? </p>
  
  <p>i.e., I have a function creating a <code>cv::Mat</code> from a <code>void *</code> pointer,</p>
  
  <pre><code>cv::Mat createMat() {
  
    void *data = (...);
  
    cv::Mat data_m(rows, cols, CV_8UC1, data);
    return data_m;
  }
  </code></pre>
  
  <p>and I want that my returned <code>cv::Mat</code> to be responsible for releasing the data. How can I do this?</p>