Merge pull request #628 from berak:ximgproc_fix_delete

pull/495/merge
Alexander Alekhin 9 years ago
commit 0c24199057
  1. 8
      modules/ximgproc/src/graphsegmentation.cpp

@ -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 {
} }
} }
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 {
// 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 {
} }
PointSet::~PointSet() { PointSet::~PointSet() {
free(mapping); delete [] mapping;
} }
int PointSet::getBasePoint( int p) { int PointSet::getBasePoint( int p) {

Loading…
Cancel
Save