Memory Leak was Re: NSAppleEventManager problems
Memory Leak was Re: NSAppleEventManager problems
- Subject: Memory Leak was Re: NSAppleEventManager problems
- From: Rosyna <email@hidden>
- Date: Mon, 22 Oct 2001 08:19:31 -0700
There is definitely a Memory leak with NSAppleEventManager when it
receives events. I changed it to use NSDistributedNotifications and
the leak is gone, nothing in the function was changed at all.
Ack, at 10/19/01, Rosyna said:
I think i am having a memory leak when I use AppleEvent Handlers
when installing them like this:
[[NSAppleEventManager sharedAppleEventManager] setEventHandler: self
andSelector:@selector(zip:) forEventClass: 'CMMf' andEventID: 'zip
'];
The implementation looks like this:
-(void) zip:(id)sender
{
if (added==NO && [[NSUserDefaults standardUserDefaults]
boolForKey:NSLocalizedString(@"Show Menu",@"")])
[self installMenu];
added=YES;
}
The application receives an AppleEvent matching this criteria every
1.5 seconds (don't ask why, it's important that it does it this
often) After a few seconds, the memory starts going up everytime it
receives sad AppleEvent.
Any clues why it could be leaking (that's all its doing, installMenu
isn't even being called.)
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insane People