<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Sun, 27 May 2018, 23:26 Even Rouault, &lt;<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; I&#39;m a bit concerned by all the hidden cost of object duplication with the<br>
&gt; approach I tried. And if you instanciate various projected coordinate<br>
&gt; systems based on the same datum, currently all the datum information would<br>
&gt; be duplicated in each PCS object, whereas with a pointer based approach you<br>
&gt; would have just one instance of it.<br>
&gt; <br>
<br>
I&#39;ve experienced with the shared_ptr approach in<br>
<a href="https://github.com/rouault/proj.4/commit/85f619cbae7a0b2071681e150f93a5301fa32098" rel="noreferrer noreferrer" target="_blank">https://github.com/rouault/proj.4/commit/85f619cbae7a0b2071681e150f93a5301fa32098</a></blockquote></div></div><div dir="auto"><br></div><div dir="auto">std::make_shared is the canonical </div><div dir="auto">and efficient way to manage shared_ptr instances.</div><div dir="auto">The new should be hardly ever needed.</div><div dir="auto"><br></div><div dir="auto">BTW, I&#39;ve been reading the thread, nothing major to add though - I myself agree with Kurt&#39;s points. </div><div dir="auto">For minor points, little point to discuss those and generate unfocused traffic. </div><div dir="auto"><br></div><div dir="auto"><br><span style="font-family:sans-serif">Mateusz Loskot, <a href="mailto:mateusz@loskot.net">mateusz@loskot.net</a></span><br style="font-family:sans-serif"><span style="font-family:sans-serif">(Sent from mobile)</span><br></div><div dir="auto"><br></div></div>