Mac Apps That Use Garbage Collection Must Move to ARC

Manu via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 22 17:48:34 PST 2015


On 23 February 2015 at 11:41, Adam D. Ruppe via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Monday, 23 February 2015 at 01:38:35 UTC, Manu wrote:
>>
>> All my ref counting types fiddle with the ref in every assignment, or
>> every function call and return.
>
>
> Hmm, the optimizer could potentially tell "inc X; dec X;" is useless and
> remove it without knowing what it is for.

Yeah, except we're talking about libraries, and in that context I often have:
extern(C) IncRef(T*);
extern(C) DecRef(T*);

Optimiser can't offer anything.


More information about the Digitalmars-d mailing list