Skip to content

Commit a9b5233

Browse files
committed
Merge pull request opencv#9931 from mshabunin:bss-cleanup
2 parents c3cced0 + e57f22a commit a9b5233

File tree

2 files changed

+236
-219
lines changed

2 files changed

+236
-219
lines changed

modules/core/include/opencv2/core/private.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ static inline cv::Size cvGetMatSize( const CvMat* mat )
159159
namespace cv
160160
{
161161
CV_EXPORTS void scalarToRawData(const cv::Scalar& s, void* buf, int type, int unroll_to = 0);
162+
163+
//! Allocate all memory buffers which will not be freed, ease filtering memcheck issues
164+
template <typename T>
165+
CV_EXPORTS T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) * count)); }
162166
}
163167

164168
// property implementation macros

0 commit comments

Comments
 (0)