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     gpar...@apple.com     Runtime Wrangler

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to