Remove memory leak (#310). Thanks to bianjiang for pointing this out.
This commit is contained in:
@@ -262,6 +262,10 @@ void NeighborSearch<SortPolicy, MetricType, TreeType>::Search(
|
||||
oldFromNewReferences[(*neighborPtr)(j, i)];
|
||||
}
|
||||
}
|
||||
|
||||
// Finished with temporary matrices.
|
||||
delete neighborPtr;
|
||||
delete distancePtr;
|
||||
}
|
||||
else if (treeOwner && hasQuerySet && singleMode) // Map only references.
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user