draft proposal for ref counting in D

Walter Bright newshound2 at digitalmars.com
Wed Oct 9 17:06:38 PDT 2013


 > On 6/25/2013 2:47 PM, Steven Schveighoffer wrote:
 >> I'm not sure exactly what is required for ARC to guarantee proper memory 
management (whether it requires flow-analysis or not), but it seems to work 
quite well for Objective-C. I think it helps minimize the expensive 
release/retain calls when you can just say "oh, someone else will clean that up 
later", just like you can with a GC.
 >>
 >> It might be good for someone who knows the ARC eliding techniques that clang 
uses to explain how they work.  We certainly shouldn't ignore those techniques.
 >>
 >
 > Also remember that O-C doesn't guarantee memory safety, so they are freed 
from some of the constraints we operate under. They can say "don't do that", we 
can't.

I'm not sure that it doesn't.  At least when we are talking about object 
references.

The only thing clang complains about is when you try to call any memory 
management manually, or if you disobey the naming conventions.

-Steve


More information about the Digitalmars-d mailing list