Re: Releasing ivars in -didTurnIntoFault. Should set to nil?
Re: Releasing ivars in -didTurnIntoFault. Should set to nil?
- Subject: Re: Releasing ivars in -didTurnIntoFault. Should set to nil?
- From: "Georg C. Brückmann" <email@hidden>
- Date: Fri, 14 Aug 2009 13:13:34 +0200
- Resent-date: Fri, 14 Aug 2009 13:14:07 +0200
- Resent-from: "Georg C. Brückmann" <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: cocoa-dev Developers <email@hidden>
2. [somewhat important] It instills a false sense of security, but
implying that extending the object lifetime to the next pool drain
is always a sufficient lifetime extension. It isn't, not necessarily.
Yes, I think that’s the point the we’ve been paying most attention to.
3. [somewhat more important] If you switch to garbage collection,
solving the original problem (in the NSURLConnection case) with
autorelease isn't possible. Under GC, the "defect" (if you'll excuse
the word) in your original design is revealed, and finding a
solution may be considerably more difficult.
That’s a very good point! So for code that should run in both
reference-counting and memory-managed environments this actually is a
strong point *against* autoreleasing, because it wouldn’t expose bugs
(in the delegating class) in the memory-managed image that would
surface in the reference-counting one.
– Georg
_______________________________________________
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