use finalize for removing AppleEvent handlers in GC apps?
use finalize for removing AppleEvent handlers in GC apps?
- Subject: use finalize for removing AppleEvent handlers in GC apps?
- From: Todd Ditchendorf <email@hidden>
- Date: Sat, 22 Dec 2007 14:19:58 -0600
In my all-GC cocoa app, I'm registering an AppleEvent handler:
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self
andSelector:@selector(handleGetURLAppleEvent:withReplyEvent:)
forEventClass:kInternetEventClass
andEventID:kAEGetURL];
It seems that before GC, you would remove this handler in the dalloc
method. (correct me if i'm wrong there)
- (void)dealloc {
...
[[NSAppleEventManager sharedAppleEventManager]
removeEventHandlerForEventClass:kInternetEventClass
andEventID:kAEGetURL];
...
}
In a GC app, should you do that removal in finalize instead? or
somewhere else? or not at all?
thanks,
todd ditchendorf
_______________________________________________
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