Radically reduced EAS memory usage

This commit is contained in:
Ludovic Marcotte
2014-12-04 11:27:10 -05:00
parent 47094b6d91
commit fe9ad9c6e9
6 changed files with 69 additions and 32 deletions

View File

@@ -36,6 +36,7 @@
#import <NGExtensions/NGBase64Coding.h>
#import <NGExtensions/NSNull+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <SOGo/SOGoCache.h>
#import <SOGo/NSObject+Utilities.h>
#import <SOGo/NSString+Utilities.h>
#import <SOGo/SOGoDomainDefaults.h>
@@ -96,10 +97,29 @@ static EOAttribute *textColumn = nil;
- (void) dealloc
{
//NSLog(@"SOGoCacheGCSObject: -dealloc for name: %@", nameInContainer);
[tableUrl release];
[super dealloc];
}
+ (id) objectWithName: (NSString *) key inContainer: (id) theContainer
{
SOGoCache *cache;
id o;
cache = [SOGoCache sharedCache];
o = [cache objectNamed: key inContainer: theContainer];
if (!o)
{
o = [super objectWithName: key inContainer: theContainer];
//NSLog(@"Caching object with key: %@", key);
[cache registerObject: o withName: key inContainer: theContainer];
}
return o;
}
- (void) setTableUrl: (NSURL *) newTableUrl
{
ASSIGN (tableUrl, newTableUrl);