Commit a9d1ab47 authored by berak's avatar berak

ximgproc: fix some mismatched new / free calls

parent d17e2aba
...@@ -244,7 +244,7 @@ namespace cv { ...@@ -244,7 +244,7 @@ namespace cv {
} }
} }
free(thresholds); delete [] thresholds;
} }
void GraphSegmentationImpl::filterSmallAreas(Edge *edges, const int &nb_edges, PointSet *es) { void GraphSegmentationImpl::filterSmallAreas(Edge *edges, const int &nb_edges, PointSet *es) {
...@@ -300,7 +300,7 @@ namespace cv { ...@@ -300,7 +300,7 @@ namespace cv {
} }
} }
free(mapped_id); delete [] mapped_id;
} }
void GraphSegmentationImpl::processImage(InputArray src, OutputArray dst) { void GraphSegmentationImpl::processImage(InputArray src, OutputArray dst) {
...@@ -332,7 +332,7 @@ namespace cv { ...@@ -332,7 +332,7 @@ namespace cv {
// Map to final output // Map to final output
finalMapping(es, output); finalMapping(es, output);
free(edges); delete [] edges;
delete es; delete es;
} }
...@@ -359,7 +359,7 @@ namespace cv { ...@@ -359,7 +359,7 @@ namespace cv {
} }
PointSet::~PointSet() { PointSet::~PointSet() {
free(mapping); delete [] mapping;
} }
int PointSet::getBasePoint( int p) { int PointSet::getBasePoint( int p) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment