[mlpack-git] master: A better memory leak fix. (b2a108f)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Tue Dec 22 17:02:26 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/6ab20afd8adaf9dcb86bc9a8ea98a24dd8b18743...eb41f4bc27b484c347acc006255104e2f8cc4eef
>---------------------------------------------------------------
commit b2a108f647781cf3a7b14b19bb8393bd156bc55d
Author: ryan <ryan at ratml.org>
Date: Tue Dec 22 17:01:41 2015 -0500
A better memory leak fix.
>---------------------------------------------------------------
b2a108f647781cf3a7b14b19bb8393bd156bc55d
src/mlpack/core/metrics/ip_metric_impl.hpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/mlpack/core/metrics/ip_metric_impl.hpp b/src/mlpack/core/metrics/ip_metric_impl.hpp
index 80e3980..8ea7f4f 100644
--- a/src/mlpack/core/metrics/ip_metric_impl.hpp
+++ b/src/mlpack/core/metrics/ip_metric_impl.hpp
@@ -62,10 +62,7 @@ void IPMetric<KernelType>::Serialize(Archive& ar,
// If we're loading, we need to allocate space for the kernel, and we will own
// the kernel.
if (Archive::is_loading::value)
- {
- kernel = new KernelType();
kernelOwner = true;
- }
ar & data::CreateNVP(kernel, "kernel");
}
More information about the mlpack-git
mailing list