draft proposal for ref counting in D
Walter Bright
newshound2 at digitalmars.com
Wed Oct 9 18:35:44 PDT 2013
Steven Schveighoffer wrote:
On Jun 26, 2013, at 12:10 AM, Walter Bright wrote:
>
> 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.
OK, it sounded like you were saying still that Objective C with ARC didn't have
memory safety.
I'm no longer arguing about autorelease, I defer to Michel on that. I clearly
didn't understand that autorelease doesn't provide any benefits for ARC, it's
just there for compatibility.
-Steve
More information about the Digitalmars-d
mailing list