1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #19045 from alalek:issue_17553

* flann: avoid dangling pointers on lost features data

* flann: fix Index::load()
This commit is contained in:
Alexander Alekhin
2020-12-11 22:09:35 +03:00
committed by GitHub
parent 8ac304517e
commit a04479746a
3 changed files with 25 additions and 5 deletions
@@ -123,7 +123,7 @@ void NearestNeighborTest::run( int /*start_from*/ ) {
Mat desc( featuresCount, dims, CV_32FC1 );
ts->get_rng().fill( desc, RNG::UNIFORM, minValue, maxValue );
createModel( desc );
createModel( desc.clone() ); // .clone() is used to simulate dangling pointers problem: https://github.com/opencv/opencv/issues/17553
tempCode = checkGetPoints( desc );
if( tempCode != cvtest::TS::OK )