Re: Avoiding mutual retain cycles
Re: Avoiding mutual retain cycles
- Subject: Re: Avoiding mutual retain cycles
- From: "Michael Ash" <email@hidden>
- Date: Mon, 21 Jul 2008 22:23:09 -0400
On Mon, Jul 21, 2008 at 4:02 PM, Markus Spoettl
<email@hidden> wrote:
>>> But there are still cases where it is unknown which of the objects is
>>> going to be released first
>>
>> Care to name one?
>
> For example NSCollectionView, NSCollectionViewItem and its view. One may or
> may not suspect the NSCollectionViewItem owns the corresponding view. It may
> as well not own it and instead the NSCollectionView owns both. Of course
> once you run into a retain cycle problem with this and no
> NSCollectionViewItem ever gets released because of it (like I did) you
> quickly learn why and who owns the view.
Without investigating things more deeply, just from the basic stuff I
know about the classes in question, I'd assume that the
NSCollectionView owns the NSCollectionViewItems and the views, and the
NSCollectionViewItems would also own the views. Where is the retain
cycle?
Mike
_______________________________________________
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