<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Michael Van Canneyt <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> schrieb am Mo., 15. Juli 2019, 23:50:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On Mon, 15 Jul 2019, Ben Grasset wrote:<br>
<br>
> On Mon, Jul 15, 2019 at 5:23 PM Sven Barth via fpc-devel <<br>
> <a href="mailto:fpc-devel@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-devel@lists.freepascal.org</a>> wrote:<br>
><br>
>> That is exactly what is happening if you have a specialization in multiple<br>
>> units that don't know about each other.<br>
>><br>
><br>
> At what point are they being removed so that the executable is not<br>
> comically large, then? Is it on the FPC side, or the linker side? Or a bit<br>
> of both perhaps?<br>
<br>
As far as I know, they are not. I believe that when specializing, the<br>
compiler checks if an identical specialization is in scope: <br>
if so, it uses that. If not, a duplicate is made.<br>
<br>
As far as I know, Delphi behaves the same.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Delphi changed this in one of the newer versions. That's also when the behavior of class variables in generics changed. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>