[mlpack-git] master: Fix memory leak. (2b381f4)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:03:57 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit 2b381f4d35981d4f6b9e665605e5460b81afab36
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Nov 24 23:05:16 2014 +0000
Fix memory leak.
>---------------------------------------------------------------
2b381f4d35981d4f6b9e665605e5460b81afab36
src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp b/src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp
index 35a3a9d..fe63498 100644
--- a/src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp
+++ b/src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp
@@ -106,6 +106,8 @@ double DualTreeKMeans<MetricType, MatType, TreeType>::Iterate(
}
Log::Info << clusterDistances.t();
+ delete centroidTree;
+
++iteration;
return std::sqrt(residual);
}
More information about the mlpack-git
mailing list