[mlpack-git] [mlpack] Temporary matrix (neighborPtr) being improperly deleted in neighbor_search_impl.hpp (#478)

Letricia Avalhais notifications at github.com
Fri Nov 20 08:04:03 EST 2015


File neighbor_search_impl.hpp
on method:
void NeighborSearch<SortPolicy, MetricType, MatType, TreeType, TraversalType>::
Search(const MatType& querySet,
       const size_t k,
       arma::Mat<size_t>& neighbors,
       arma::mat& distances)

At line 461:
---> delete neighborPtr; 

But in this case, when treeOwner is false, the matrix neighborPtr is not allocated with "new".

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/478
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20151120/faa6eee9/attachment.html>


More information about the mlpack-git mailing list