Re: Avoiding mutual retain cycles
Re: Avoiding mutual retain cycles
- Subject: Re: Avoiding mutual retain cycles
- From: Markus Spoettl <email@hidden>
- Date: Mon, 21 Jul 2008 20:27:58 -0700
On Jul 21, 2008, at 1:03 PM, Philippe Mougin wrote:
In the general case, there is no rule or mechanism to deal with
retain cycles other than implementing something equivalent to a
garbage collector. In some situations, however, the specific
semantics and life-cycle of the objects you are dealing with allow
implementing more simpler, ad hoc solutions (e.g., ownership
management in the view hierarchy). Still, this requires notable
housekeeping efforts and is often error prone. If you are in a
situation where you can make use of Cocoa's garbage collector, you
should go for it. It will free you from a bunch of low-level memory
management tasks, including having to care about cyclic references.
Call me a retro coward, but I absolutely dislike the idea of GC. I
just don't see the point of it given the complicated implications it
can have.
Anyway, thanks for your suggestion.
Regards
Markus
--
__________________________________________
Markus Spoettl
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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