• 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: Garbage collected and non-garbage collected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Garbage collected and non-garbage collected


  • Subject: Re: Garbage collected and non-garbage collected
  • From: Greg Parker <email@hidden>
  • Date: Thu, 12 Mar 2009 11:45:09 -0700


On Mar 12, 2009, at 11:33 AM, Robert Mullen wrote:

OK, I took a step back today and reconvened the knowledge you guys have shared, reread the Hillegass chapter on GC (what a great book!!), and reviewed the approaches I had taken. One thing that jumped out at me was that I had not revisited the flags:

_SM2DGraphView_Private = NSAllocateCollectable(sizeof(SM2DPrivateData), NSScannedOption| NSCollectorDisabledOption);

with the __strong declaration on the private data object. If I use both flags as shown above (which is what was originally suggested by Greg Parker AND the __strong declaration on

#define myPrivateData ((SM2DPrivateData __strong *) _SM2DGraphView_Private)

the framework compiles, my project compiles with it and miracle of miracles it appears to run fully. Obviously I need to put this through its paces but this is the only time I have had a successful run of this inclusive project with GC on. Thanks to everybody who added a little bit, each piece has helped me to understand the whole better even if the project eventually fails.

Can anybody see obvious problems in what I did above?

Yes. __strong should be part of the ivar declaration, not the #define.


-- Greg Parker email@hidden Runtime Wrangler

_______________________________________________

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: 
 >Garbage collected and non-garbage collected (From: Robert Mullen <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: "Sean McBride" <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: "I. Savant" <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Robert Mullen <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: "I. Savant" <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Robert Mullen <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: "I. Savant" <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Robert Mullen <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: "I. Savant" <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Bill Bumgarner <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Robert Mullen <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Bill Bumgarner <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Robert Mullen <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Greg Parker <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Greg Parker <email@hidden>)
 >Re: Garbage collected and non-garbage collected (From: Robert Mullen <email@hidden>)

  • Prev by Date: Re: Garbage collected and non-garbage collected
  • Next by Date: Re: Handling WebView DOM events in Cocoa
  • Previous by thread: Re: Garbage collected and non-garbage collected
  • Next by thread: Re: Garbage collected and non-garbage collected
  • Index(es):
    • Date
    • Thread