attempt to fix pure virtual call in Mat::deallocate
authorIlya Lavrenov <ilya.lavrenov@itseez.com>
Tue, 4 Feb 2014 15:47:58 +0000 (19:47 +0400)
committerIlya Lavrenov <ilya.lavrenov@itseez.com>
Tue, 4 Feb 2014 15:50:37 +0000 (19:50 +0400)
modules/core/src/matrix.cpp
modules/core/src/ocl.cpp

index 8a11d09..a90ca5c 100644 (file)
@@ -222,8 +222,8 @@ public:
 
 MatAllocator* Mat::getStdAllocator()
 {
-    static StdMatAllocator allocator;
-    return &allocator;
+    static MatAllocator * allocator = new StdMatAllocator();
+    return allocator;
 }
 
 void swap( Mat& a, Mat& b )
index 6f19b56..9dd9f05 100644 (file)
@@ -3959,8 +3959,8 @@ public:
 
 MatAllocator* getOpenCLAllocator()
 {
-    static OpenCLAllocator allocator;
-    return &allocator;
+    static MatAllocator * allocator = new OpenCLAllocator();
+    return allocator;
 }
 
 ///////////////////////////////////////////// Utility functions /////////////////////////////////////////////////