[D1] gc safety

Simen kjaeraas simen.kjaras at gmail.com
Tue Oct 12 17:26:48 PDT 2010


%u <e at ee.com> wrote:

> == Quote from Simen kjaeraas (simen.kjaras at gmail.com)'s article
>> %u <e at ee.com> wrote:
>> > How gc unfriendly is an union of objects and sizet_t?
>> >
>> > union{
>> >   size_t arr[10];
>> >   Class obj[10];
>> > }
>> All elements of this union will be considered pointers by the GC.
> The object will always occupy a continuous obj[0..x], is there some way  
> to explain
> this to the GC?

Perhaps. Is there a way to explain it to me? Do you mean the first x
elements will be objects, and the rest will be size_ts that are not
pointers?

-- 
Simen


More information about the Digitalmars-d-learn mailing list