removed refcount field from Mat; that helped to find and eliminate some memory leaks. perf tests should probably pass now

This commit is contained in:
Vadim Pisarevsky
2013-10-24 16:08:15 +04:00
parent 5a34272150
commit 303df78cca
6 changed files with 39 additions and 47 deletions

View File

@@ -547,11 +547,10 @@ Mat UMat::getMat(int accessFlags) const
u->currAllocator->map(u, accessFlags);
CV_Assert(u->data != 0);
Mat hdr(dims, size.p, type(), u->data + offset, step.p);
hdr.refcount = &u->refcount;
hdr.u = u;
hdr.datastart = hdr.data = u->data;
hdr.datalimit = hdr.dataend = u->data + u->size;
CV_XADD(hdr.refcount, 1);
CV_XADD(&hdr.u->refcount, 1);
return hdr;
}