<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 26 August 2015 at 15:14, Mike via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Saturday, 22 August 2015 at 10:11:24 UTC, Iain Buclaw wrote:<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A MUCH better solution:<br>
<br>
T[] _d_arrayliteral(T)(size_t length)<br>
<br>
Also, isn't the typeinfo now stored by the GC so it can call the dtor? Perhaps that is done in the filling of the array literal, but I would be surprised as this is a GC feature.<br>
<br>
<br>
</blockquote></span><span class="">
I only looked at 2.066.1, the runtime implementation did not pass the typeinfo to the GC.<br>
</span></blockquote>
<br>
_d_arrayliteralTX eventually calls structTypeInfoSize() which, according to <a href="https://github.com/D-Programming-Language/druntime/blob/master/src/rt/lifetime.d#L214" rel="noreferrer" target="_blank">https://github.com/D-Programming-Language/druntime/blob/master/src/rt/lifetime.d#L214</a>, is used to determine the size of TypeInfo so it can be stored by the GC, as Steven said.<br>
<br>
Mike<br>
<br></blockquote><div><br></div><div>Well, I have no control over what the library maintainers in DMD want to do in their runtime, but all is working fine without doing that in my camp. <br></div></div><br></div></div>