diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index 5db98529cd..e6770f580f 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -378,7 +378,8 @@ inline void Mat::addref() inline void Mat::release() { if( refcount && CV_XADD(refcount, -1) == 1 ) - deallocate(); + //deallocate(); + fastFree(datastart); data = datastart = dataend = datalimit = 0; size.p[0] = 0; refcount = 0;