[mlpack-git] master: Fix ownership bug: we don't own when we Train(). (43c57aa)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Fri Nov 20 17:33:34 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/962a37fe8374913c435054aa50e12d912bdfa01c...a7d8231fe7526dcfaadae0bf37d67b50d286e45d
>---------------------------------------------------------------
commit 43c57aac13c5f4e81c3083074878872b1b1b050a
Author: Ryan Curtin <ryan at ratml.org>
Date: Fri Nov 20 21:38:09 2015 +0000
Fix ownership bug: we don't own when we Train().
>---------------------------------------------------------------
43c57aac13c5f4e81c3083074878872b1b1b050a
src/mlpack/methods/lsh/lsh_search_impl.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mlpack/methods/lsh/lsh_search_impl.hpp b/src/mlpack/methods/lsh/lsh_search_impl.hpp
index 66a78be..a174de6 100644
--- a/src/mlpack/methods/lsh/lsh_search_impl.hpp
+++ b/src/mlpack/methods/lsh/lsh_search_impl.hpp
@@ -71,6 +71,7 @@ void LSHSearch<SortPolicy>::Train(const arma::mat& referenceSet,
if (this->referenceSet && ownsSet)
delete this->referenceSet;
this->referenceSet = &referenceSet;
+ this->ownsSet = false;
// Set new parameters.
this->numProj = numProj;
More information about the mlpack-git
mailing list