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