mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
fix MatAllocator creation/destruction issues
This commit is contained in:
@@ -222,10 +222,14 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static StdMatAllocator *mat_allocator = NULL;
|
||||
MatAllocator* Mat::getStdAllocator()
|
||||
{
|
||||
static StdMatAllocator allocator;
|
||||
return &allocator;
|
||||
if (mat_allocator == NULL)
|
||||
{
|
||||
mat_allocator = new StdMatAllocator();
|
||||
}
|
||||
return mat_allocator;
|
||||
}
|
||||
|
||||
void swap( Mat& a, Mat& b )
|
||||
|
||||
Reference in New Issue
Block a user