draft proposal for ref counting in D

Walter Bright newshound2 at digitalmars.com
Wed Oct 9 18:35:14 PDT 2013


On 6/25/2013 8:08 PM, Steven Schveighoffer wrote:
 > On Jun 25, 2013, at 11:04 PM, Walter Bright wrote:
 >
 >> On 6/25/2013 6:31 PM, Michel Fortin wrote:
 >>> And finally, there's nothing unsafe with autorelease pools as long as you 
don't keep an unretained reference to an autoreleased object when the pool drains.
 >> Well, that's exactly the issue - an escaping reference.
 >>
 > Read the next sentence after your quote though:
 >
 > "Making sure you have no unretained reference is ARC's job, so with ARC it 
should not be no problem."
 >
 > So with ARC, it's not unsafe.  I think that was the ultimate point.

Yes, I read the next sentence. What it means to me is that autorelease pools add 
nothing when ARC is implemented - no optimizations, either. Either that or I 
don't understand how ARC figures out that there are no escaping references 
without doing things like runtime checks.



More information about the Digitalmars-d mailing list