RCArray is unsafe

Zach the Mystic via Digitalmars-d digitalmars-d at puremagic.com
Sun Mar 1 10:50:59 PST 2015


On Sunday, 1 March 2015 at 17:48:15 UTC, Marc Sch├╝tz wrote:
>> See:
>> http://forum.dlang.org/post/bghjqvvrdcfqmoiyyuqz@forum.dlang.org
>> ...and:
>> http://forum.dlang.org/post/cviwlkugnothraubcfgy@forum.dlang.org
>
> That's not applicable here though. The compiler doesn't know 
> we're doing reference counting, so it cannot insert 
> AddRef/Release calls.

Maybe the compiler can detect a split-pass and insert the 
appropriate calls to the correlate opAdd/opRelease functions for 
structs according to the same rules as for classes. Isn't 
split-passing a rare business in general?


More information about the Digitalmars-d mailing list