• 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: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful


  • Subject: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • From: Michael Tsai <email@hidden>
  • Date: Thu, 7 Feb 2008 23:56:59 -0500

On Feb 7, 2008, at 11:23 PM, John Engelhart wrote:

Another claim I have made is that "treating everything on the stack as __strong is not the right thing, it is only going to mask the problem." One could argue that the choice of treating everything on the stack as __strong is proof of how often the compiler is getting this automagic promotion wrong, or otherwise dropping the __strong qualification during some code transformation. My hypothesis is that if write barriers were being generated correctly, there would be no need to treat the stack as special, other than the fact of "how much" of the stack to be considered live relative to the top frame.

Treating everything on the stack as __strong makes things simpler for the programmer; you don't have to worry about what the compiler is or isn't checking for you. Secondly, as you noted above, it's relatively expensive to turn assignments into function calls. It would be a waste of time to do this for variables within short-lived stack frames.


Despite the (sometimes foaming at the mouth) assertions that the GC rules are "easy", what is transpiring is reasonable people are having differences of opinion regarding the use of GC allocated memory.

Perhaps we can agree that the rules for objects, the most common case, are easy.


--Michael


_______________________________________________

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: 
 >Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: John Engelhart <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: Alastair Houghton <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: John Engelhart <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: Alastair Houghton <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: John Engelhart <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: Michael Tsai <email@hidden>)
 >Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful (From: John Engelhart <email@hidden>)

  • Prev by Date: CoreData Predicate Question - Retriving child objects
  • Next by Date: CARenderer difficulties with rendering 3D transformed layers
  • Previous by thread: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Next by thread: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Index(es):
    • Date
    • Thread