I am not sure if i am asking the right question or not.
I have a singleton class as below:
static DBHandler *dbHandler = nil;
+(DBHandler *)sharedDBHandler {
@synchronized(self) {
if(nil == dbHandler) {
dbHandler = [[[self class] alloc] init];
}
}
return dbHandler;
}
When and where to release a Singleton instance in Objective-C ?
Thanks,
Most often they are located in static memory which means they are handled differently. See this question:
Objective-C/iPhone Memory Management Static Variables