Re: Don't you hate it when Appkit crashes?
Re: Don't you hate it when Appkit crashes?
- Subject: Re: Don't you hate it when Appkit crashes?
- From: Quincey Morris <email@hidden>
- Date: Fri, 12 Feb 2016 21:02:25 -0800
- Feedback-id: 167118m:167118agrif8a:167118sGt0F4qaCV:SMTPCORP
On Feb 12, 2016, at 19:46 , Graham Cox <email@hidden> wrote:
>
> I’ve been running with zombies on and this crash occurs still
I think, in the scenario I described, zombie detection won’t help. It’s not an undead object, but an undead reference.
It’s also worth noting, though no help at all to you at the moment, that Swift objects actually have two reference counts, one for strong references and one for non-strong references. Thus, objects aren’t fully deallocated until there literally are no references. Of course, referencing an object that has no strong references will cause a deliberate crash, but that’s good. You are guaranteed that an invalid pointer is reliably invalid.
I recommend Mike Ash’s in-depth investigation into this topic:
https://mikeash.com/pyblog/friday-qa-2015-12-11-swift-weak-references.html <https://mikeash.com/pyblog/friday-qa-2015-12-11-swift-weak-references.html>
and offer the opinion that even if you don’t think Swift is a superior language, it’s aggressively moving in the direction of being a superior developer experience.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden