diff --git a/SoObjects/SOGo/SOGoCache.m b/SoObjects/SOGo/SOGoCache.m index bbc940c87..e6cbf3090 100644 --- a/SoObjects/SOGo/SOGoCache.m +++ b/SoObjects/SOGo/SOGoCache.m @@ -58,12 +58,14 @@ static NSLock *lock; @implementation SOGoCache -#if defined(THREADSAFE) + (void) initialize { + #if defined(THREADSAFE) lock = [NSLock new]; -} #endif + s_userDefaults = [[NSMutableDictionary alloc] init]; + s_userSettings = [[NSMutableDictionary alloc] init]; +} + (NSTimeInterval) cleanupInterval { @@ -105,9 +107,6 @@ static NSLock *lock; cache = [[NSMutableDictionary alloc] init]; users = [[NSMutableDictionary alloc] init]; - s_userDefaults = [[NSMutableDictionary alloc] init]; - s_userSettings = [[NSMutableDictionary alloc] init]; - // We register ourself for notifications [[NSDistributedNotificationCenter defaultCenter] addObserver: self