I am trying to have a fairly dynamic api for the level class of my game... basically, I just have a bunch of class methods optionsForLevel1, optionsForLevel2, ...etc, that all return a dictionary object with things like how much time the level should have, how many bonus points, the level's name, etc...
In my actual game object, when it's time to advance levels, it calls a method on the level object which does:
+(NSDictionary*)performClassSelectorForLevel:(int)identifier {
SEL sel = NSSelectorFromString([NSString stringWithFormat:@"optionsForLevel%d", identifier]);
return [self performSelector:sel];
}
This gives me a warning: PerformSelector may cause a leak because its selector is unknown.
...
How can I resolve this warning?