Remove memory leak (#310). Thanks to bianjiang for pointing this out.

This commit is contained in:
Ryan Curtin
2013-11-18 18:47:02 +00:00
parent 62108e0e49
commit 7aa2f49ea9
@@ -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.
{