On Oct 29, 2008, at 10:22 AM, Adam Penny wrote:

I want to save preferences when the user either closes the preference pane window, clicks the show all button or quits system preferences. Can I just put the method call in the -(void)dealloc or is this a bad idea?


Bad idea. -dealloc is reserved for nullifying pointers in other objects, releasing objects, etc. Your idea will also break if the pane never gets deallocated, and will also fail if preference panes ever support GC in the future. I would recommend just setting preferences as you go; this is not an expensive thing to do.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to