Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

refcount attribute

Can anyone explain how exactly the refcount attribute is used in OpenCV structs? I am specifically looking at refcount in CvMat. I expected refcount to be used memory management, but looking at the source code (array.cpp and matrix.cpp), I see that the value of refcount is 0 or 1. I expected to see refcount incremented in shallow copy operations like cvMatToMat(const CvMat* m, bool copyData) with copyData=false. Am I missing something or not looking at the right source files?

Thanks.