DIP60: @nogc attribute

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 17 11:47:00 PDT 2014


On 4/17/2014 10:05 AM, Steven Schveighoffer wrote:
>> Obj-C only uses ARC for a minority of the objects.
> Really? Every Obj-C API I've seen uses Objective-C objects, which all use RC.

And what about all allocated items?


>> A UI is a good use case for ARC. A UI doesn't require high performance.
> I've written video processing/players on iOS, they all use blocks and reference
> counting, including to do date/time processing per frame. All while using RC
> network buffers. And it works quite smoothly.

And did you use ref counting for all allocations and all pointers?

There's no doubt that ref counting can be used successfully here and there, with 
a competent programmer knowing when he can just convert it to a raw pointer and 
use that.

It's another thing entirely to use ref counting for ALL pointers.

And remember that if you have exceptions, then all the dec code needs to be in 
exception unwind handlers.



More information about the Digitalmars-d mailing list