Commit 736097a4 authored by Andrey Pavlenko's avatar Andrey Pavlenko Committed by OpenCV Buildbot

Merge pull request #1868 from KonstantinMatskevich:umat_bugfix

parents aaf97c45 14585576
...@@ -2705,6 +2705,7 @@ public: ...@@ -2705,6 +2705,7 @@ public:
} }
u->markHostCopyObsolete(false); u->markHostCopyObsolete(false);
clReleaseMemObject((cl_mem)u->handle); clReleaseMemObject((cl_mem)u->handle);
u->handle = 0;
u->currAllocator = u->prevAllocator; u->currAllocator = u->prevAllocator;
if(u->data && u->copyOnMap()) if(u->data && u->copyOnMap())
fastFree(u->data); fastFree(u->data);
...@@ -2717,6 +2718,7 @@ public: ...@@ -2717,6 +2718,7 @@ public:
if(u->data && u->copyOnMap()) if(u->data && u->copyOnMap())
fastFree(u->data); fastFree(u->data);
clReleaseMemObject((cl_mem)u->handle); clReleaseMemObject((cl_mem)u->handle);
u->handle = 0;
delete u; delete u;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment