• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Avoiding mutual retain cycles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Avoiding mutual retain cycles
      • From: Markus Spoettl <email@hidden>
References: 
 >Avoiding mutual retain cycles (From: Markus Spoettl <email@hidden>)
 >Re: Avoiding mutual retain cycles (From: Andreas Mayer <email@hidden>)
 >Re: Avoiding mutual retain cycles (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Crash drawing shadows
  • Next by Date: Re: Crash drawing shadows
  • Previous by thread: Re: Avoiding mutual retain cycles
  • Next by thread: Re: Avoiding mutual retain cycles
  • Index(es):
    • Date
    • Thread