• 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: Guidelines for Cocoa frameworks supporting garbage collection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guidelines for Cocoa frameworks supporting garbage collection?


  • Subject: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • From: "Shawn Erickson" <email@hidden>
  • Date: Sun, 6 Jul 2008 09:25:36 -0700

On Sun, Jul 6, 2008 at 9:05 AM, Jean-Daniel Dupas
<email@hidden> wrote:

> I think the rule may be:
> use __strong for retained/copied ivars, and nothing for assigned ivars.
> There is no equivalent of zeroing ref, but weak ref are really common in
> Cocoa. For example, delegate are not retain. the Notification center does
> not retain observers, and the drawer probably does not retain the runloop.

The reason delegates and observers aren't retained it to avoid retain
cycles. In a GC world cycles aren't a problem (cycle with no roots
will be collected). As a result ivars to delegates and observers, etc.
can (and some do IIRC) use strong references.

-Shawn
_______________________________________________

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

References: 
 >Re: Guidelines for Cocoa frameworks supporting garbage collection? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Guidelines for Cocoa frameworks supporting garbage collection? (From: Bill Cheeseman <email@hidden>)
 >Re: Guidelines for Cocoa frameworks supporting garbage collection? (From: "Michael Ash" <email@hidden>)
 >Re: Guidelines for Cocoa frameworks supporting garbage collection? (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • Next by Date: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • Previous by thread: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • Next by thread: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • Index(es):
    • Date
    • Thread