mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 23:03:03 +04:00
ocl: silence warning in case of async cleanup
- OpenCL kernel cleanup processing is asynchronous and can be called even after forced clFinish() - buffers are released later in asynchronous mode - silence these false positive cases for asynchronous cleanup
This commit is contained in:
@@ -80,6 +80,7 @@ UMatData::~UMatData()
|
||||
CV_Assert(mapcount == 0);
|
||||
data = origdata = 0;
|
||||
size = 0;
|
||||
bool isAsyncCleanup = !!(flags & UMatData::ASYNC_CLEANUP);
|
||||
flags = 0;
|
||||
handle = 0;
|
||||
userdata = 0;
|
||||
@@ -106,7 +107,7 @@ UMatData::~UMatData()
|
||||
showWarn = true;
|
||||
if (zero_Ref && zero_URef) // oops, we need to free resources
|
||||
{
|
||||
showWarn = true;
|
||||
showWarn = !isAsyncCleanup;
|
||||
// simulate UMat::deallocate
|
||||
u->currAllocator->deallocate(u);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user