[mlpack] 27/35: Fix memory leak when dual tree search and treeOwner == true
Barak A. Pearlmutter
barak+git at pearlmutter.net
Thu Sep 15 23:29:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit 96b536b8911eaf2cd29c21e9c2a404d78f7fc972
Author: MarcosPividori <marcos.pividori at gmail.com>
Date: Wed Jul 20 17:57:36 2016 -0300
Fix memory leak when dual tree search and treeOwner == true
---
src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp b/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp
index cba373f..18a1e52 100644
--- a/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp
+++ b/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp
@@ -355,8 +355,7 @@ Search(const MatType& querySet,
distancePtr = new arma::mat; // Query indices need to be mapped.
neighborPtr = new arma::Mat<size_t>;
}
-
- if (treeOwner)
+ else if (treeOwner)
neighborPtr = new arma::Mat<size_t>; // Reference indices need mapping.
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list