Possible Duplicate:
performSelector may cause a leak because its selector is unknown
I did a NSDictionary to convert my input(NSString) to selector. The "selector map" is looked as follows :
[self setCmdSelectorMap:[NSDictionary dictionaryWithObjectsAndKeys:
[NSValue valueWithPointer:@selector(doOpenBrowserByString:)], @"openBrowser",
[NSValue valueWithPointer:@selector(syncData:)], @"sync",
[NSValue valueWithPointer:@selector(getCachedString:)], @"getCachedString",
nil]];
When I try to fetch one of these selector and perform it by follows, it cause a warning :
sel = [[_cmdMap objectForKey:command] pointerValue];
NSLog(@"selector determined : %@", NSStringFromSelector(sel));
[self performSelector:sel withObject:arguments];
The warning says : PerformSelector may cause a leak because its selector is unknown. Is there any way to prevent this warning from occurring? or is there any "safer" way to perform such an action?
Thanks guys :)