<p>In <a href="https://github.com/mlpack/mlpack/pull/664#discussion_r67935306">src/mlpack/core/tree/rectangle_tree/discrete_hilbert_value_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +    {
&gt; +      localDataset = NULL;
&gt; +      numValues = 0;
&gt; +    }
&gt; +  }
&gt; +}
&gt; +
&gt; +template&lt;typename TreeElemType&gt;
&gt; +template&lt;typename TreeType&gt;
&gt; +void DiscreteHilbertValue&lt;TreeElemType&gt;::Copy(TreeType* dst, TreeType* src)
&gt; +{
&gt; +  DiscreteHilbertValue&lt;TreeElemType&gt; &amp;dstVal = dst-&gt;AuxiliaryInfo().HilbertValue();
&gt; +  DiscreteHilbertValue&lt;TreeElemType&gt; &amp;srcVal = src-&gt;AuxiliaryInfo().HilbertValue();
&gt; +
&gt; +  dst.LocalDataset() = src.LocalDataset();
&gt; +  dst.NumValues() = src.NumValues();
</pre>
<p>I think that there can be weird memory issues when calling this method because <code>ownsLocalDataset</code> is not considered.  I think it may be better to remove this method and replace it with a copy constructor or a move constructor (or both); the same comments apply to <code>HilbertRTreeAuxiliaryInformation</code> and <code>XTreeAuxiliaryInformation</code>.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<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#r67935306">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFOdRVnxGU1lLP4Dpjd0loLKf6S9oks5qODrZgaJpZM4IrlzT">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFAWwMroT200pUGl_pWbSsfECN8vvks5qODrZgaJpZM4IrlzT.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#r67935306"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>