I have a factory which handles singletons as follows
@implementation MyFactory
- (AudioEngine *)theAudioEngine
{
static AudioEngine *ae = nil;
if (ae == nil) {
ae = [[AudioEngine] alloc] init];
}
return ae;
}
@end
Are such static local variables released when the MyFactory instance is dealloc'ed?