Object.factory() and exe file size bloat
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Thu Aug 27 05:18:12 PDT 2015
On 8/26/15 10:50 AM, Iain Buclaw via Digitalmars-d wrote:
> On 26 August 2015 at 15:14, Mike via Digitalmars-d
> <digitalmars-d at puremagic.com <mailto:digitalmars-d at puremagic.com>> wrote:
>
> On Saturday, 22 August 2015 at 10:11:24 UTC, Iain Buclaw wrote:
>
> A MUCH better solution:
>
> T[] _d_arrayliteral(T)(size_t length)
>
> 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.
>
>
> I only looked at 2.066.1, the runtime implementation did not
> pass the typeinfo to the GC.
>
>
> _d_arrayliteralTX eventually calls structTypeInfoSize() which,
> according to
> https://github..com/D-Programming-Language/druntime/blob/master/src/rt/lifetime.d#L214
> <https://github.com/D-Programming-Language/druntime/blob/master/src/rt/lifetime.d#L214>,
> is used to determine the size of TypeInfo so it can be stored by the
> GC, as Steven said.
>
> Mike
>
>
> 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.
>
The change was to make it so struct dtors are called by the GC.
-Steve
More information about the Digitalmars-d
mailing list