Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/mlpack/core/metrics/ip_metric_impl.hpp b/src/mlpack/core/metrics/ip_metric_impl.hpp
- index d39026593..5155eb380 100644
- --- a/src/mlpack/core/metrics/ip_metric_impl.hpp
- +++ b/src/mlpack/core/metrics/ip_metric_impl.hpp
- @@ -65,6 +65,10 @@ template<typename Archive>
- void IPMetric<KernelType>::serialize(Archive& ar,
- const unsigned int /* version */)
- {
- + // Delete an existing kernel.
- + if (kernelOwner)
- + delete kernel;
- +
- // If we're loading, we need to allocate space for the kernel, and we will own
- // the kernel.
- if (Archive::is_loading::value)
Add Comment
Please, Sign In to add comment