mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 22:00:25 +08:00
bugfix in deallocate
This commit is contained in:
parent
3ab47300ce
commit
145855767c
@ -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:
|
|||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user