UMat dealloc problem.

asked 2018-12-13 00:01:34 -0600

Rakshith gravatar image

updated 2018-12-13 00:04:18 -0600

When the function reaches end of scope one particular UMat is failing to get deallocated and I'm getting this in call stack:

"UMat deallocation error: some derived Mat is still alive"

This is happening when I'm copying the UMat to Mat. If I dont copy to Mat then there is no issue. But I need the Mat version.

Code to reproduce:

cv::Mat x;
void some_function(cv::Mat x)
{
  cv::UMat y;
  x = y.getMat(cv::ACCESS_RW);
}

Even adding y.release() in the end didn't solve the issue.

edit retag flag offensive close merge delete