[mlpack] 116/149: Fix memory leak.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Sat May 2 09:11:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch svn-trunk
in repository mlpack.
commit a2f4a478e577a93c2ba8fe77d29afb8d56e8aa03
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date: Mon Nov 24 23:05:16 2014 +0000
Fix memory leak.
git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17404 9d5b8971-822b-0410-80eb-d18c1038ef23
---
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);
}
--
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