Re: Guidelines for Cocoa frameworks supporting garbage collection?
Re: Guidelines for Cocoa frameworks supporting garbage collection?
- Subject: Re: Guidelines for Cocoa frameworks supporting garbage collection?
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 05 Jul 2008 18:14:01 -0400
- Thread-topic: Guidelines for Cocoa frameworks supporting garbage collection?
on 2008-07-05 5:56 PM, Chris Hanson at email@hidden wrote:
> On Jul 5, 2008, at 2:23 PM, Bill Cheeseman wrote:
>
>> So, I guess my frameworks should declare ...
>>
>> __strong CGEventRef myEvent;
>> __strong AXUIElementRef myUIElement;
>>
>> ... if I am going to advertise the frameworks as supporting both
>> retain/release and garbage collection. Is that right?
>
> That's correct.
Thanks. This and your other comments are very helpful. I see them all echoed
in the Apple documentation, but I must say that the Apple documentation is
pretty bare-bones at this point.
For example, it would be very helpful to have some good examples of ways to
move cleanup code out of dealloc/finalize and into what you call
"deterministic" methods. I suppose delegate methods like -windowWillClose
will do the trick, but I'll have to examine my code pretty closely to get
this straight.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
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