On 23 February 2015 at 11:41, Adam D. Ruppe via Digitalmars-d
<digitalmars-d@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.

Reply via email to