Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f7d36bba
Commit
f7d36bba
authored
Aug 31, 2015
by
Ilya Lavrenov
Committed by
Dikay900
Sep 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed memory leaks in modules/features2d/test/test_nearestneighbors.cpp
parent
d81a0df4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
test_nearestneighbors.cpp
modules/features2d/test/test_nearestneighbors.cpp
+9
-2
No files found.
modules/features2d/test/test_nearestneighbors.cpp
View file @
f7d36bba
...
...
@@ -161,7 +161,7 @@ void NearestNeighborTest::run( int /*start_from*/ ) {
class
CV_FlannTest
:
public
NearestNeighborTest
{
public
:
CV_FlannTest
()
{
}
CV_FlannTest
()
:
NearestNeighborTest
(),
index
(
NULL
)
{
}
protected
:
void
createIndex
(
const
Mat
&
data
,
const
IndexParams
&
params
);
int
knnSearch
(
Mat
&
points
,
Mat
&
neighbors
);
...
...
@@ -172,6 +172,9 @@ protected:
void
CV_FlannTest
::
createIndex
(
const
Mat
&
data
,
const
IndexParams
&
params
)
{
// release previously allocated index
releaseModel
();
index
=
new
Index
(
data
,
params
);
}
...
...
@@ -238,7 +241,11 @@ int CV_FlannTest::radiusSearch( Mat& points, Mat& neighbors )
void
CV_FlannTest
::
releaseModel
()
{
delete
index
;
if
(
index
)
{
delete
index
;
index
=
NULL
;
}
}
//---------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment