Skip to content

Commit

Permalink
core: use correct delete operator for array of new, eliminates a bunc…
Browse files Browse the repository at this point in the history
…h of memory leaks

Signed-off-by: Ron Evans <ron@hybridgroup.com>
  • Loading branch information
deadprogram committed Jan 18, 2018
1 parent 9820a30 commit 77bc4f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,19 +223,19 @@ TermCriteria TermCriteria_New(int typ, int maxCount, double epsilon) {
}

void Contours_Close(struct Contours cs) {
delete cs.contours;
delete[] cs.contours;
}

void KeyPoints_Close(struct KeyPoints ks) {
delete ks.keypoints;
delete[] ks.keypoints;
}

void Rects_Close(struct Rects rs) {
delete rs.rects;
delete[] rs.rects;
}

void Mats_Close(struct Mats mats) {
delete mats.mats;
delete[] mats.mats;
}

void ByteArray_Release(struct ByteArray buf) {
Expand Down

0 comments on commit 77bc4f3

Please sign in to comment.