From 2a2c21bb632c4f10cd0c7ca12b575c53f33ed82d Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 13 Aug 2013 18:52:06 +0400 Subject: [PATCH] Replace an incorrect usage of Ptr with a simple vector. --- apps/traincascade/boost.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/traincascade/boost.cpp b/apps/traincascade/boost.cpp index 29ac4bc9af..732704a4a2 100644 --- a/apps/traincascade/boost.cpp +++ b/apps/traincascade/boost.cpp @@ -957,7 +957,7 @@ void CvCascadeBoostTree::write( FileStorage &fs, const Mat& featureMap ) int subsetN = (maxCatCount + 31)/32; queue internalNodesQueue; int size = (int)pow( 2.f, (float)ensemble->get_params().max_depth); - Ptr leafVals = new float[size]; + std::vector leafVals(size); int leafValIdx = 0; int internalNodeIdx = 1; CvDTreeNode* tempNode;