<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">
<p>Le 29/05/2018 à 14:28, Even Rouault a écrit :</p>
</div>
<blockquote type="cite" cite="mid:3769264.JqHezskdrk@even-i700">
<p>Another main reason is that the UML modelling from which this
is derived from has probably be done with Java in mind as an
implementation target. So shared pointers are the closest tool
we have to emulate Java garbage collection.</p>
</blockquote>
<p>Actually the design is a little bit more abstract. Normally
(unless we did a mistake in the model), there is no requirement to
use a garbage collector or not; the choice is up to implementer.
ISO 19111 allows implementations without garbage collector by
allowing some pointers to be null, for breaking cycles. For
example, on a conceptual point of view Conversion.source/targetCRS
should never be null. But in practice ISO 19111 nevertheless
declares those associations as optional for implementers who want
to avoid cycles between Conversion and ProjectedCRS.</p>
<p>So the choice for PROJ may be:</p>
<ul>
<li>Avoid cycles as allowed by ISO 19111, at the cost of some
inconveniences (e.g. usages of Conversion objects may require
more contextual information).</li>
<li>More convenient Conversion objects, at the cost of cyclic
references.</li>
</ul>
<p>ProjectedCRS ⇋ Conversion is the main potential cycle I'm aware
of. There may be another one in the new classes related to point
motions or vertical transformations, but I'm not sure (I'm not yet
familiar enough with that new part).</p>
<p> Martin</p>
<p><br>
</p>
</body>
</html>