<p>In <a href="https://github.com/mlpack/mlpack/pull/664#discussion_r67791456">src/mlpack/core/tree/rectangle_tree/discrete_hilbert_value_impl.hpp</a>:</p>
<pre style='color:#555'>> + ownsLocalDataset = true;
> + }
> +
> + if (ownsLocalDataset)
> + {
> + localDataset = new arma::Mat<HilbertElemType>(tree->Dataset().n_rows,
> + tree->MaxLeafSize() + 1);
> + }
> +
> +}
> +
> +template<typename TreeElemType>
> +DiscreteHilbertValue<TreeElemType>::
> +DiscreteHilbertValue(const DiscreteHilbertValue& other) :
> + localDataset(const_cast<arma::Mat<HilbertElemType>*>(other.LocalDataset())),
> + ownsLocalDataset(other.ownsLocalDataset),
</pre>
<p>You're right, this is not a valid copy-constructor. But this it exactly the same as the RectangleTree copy constructor. You should invoke NullifyData().</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/664/files/f9127cea62d5ce1ad8d5f59931de108a2f7cdd9b#r67791456">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFHlM7PeMaydWnm3K2LrCPyl9PdLLks5qNzIfgaJpZM4IrlzT">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNxMlpNQWmDwIQHeDL0tzX_aedz0ks5qNzIfgaJpZM4IrlzT.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/664/files/f9127cea62d5ce1ad8d5f59931de108a2f7cdd9b#r67791456"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>