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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user