(fix) improved memory usage

pull/91/head
Ludovic Marcotte 2015-06-17 08:46:09 -04:00
parent a49032a6bd
commit e5c4907aba
1 changed files with 5 additions and 3 deletions

View File

@ -131,10 +131,12 @@ static NSArray *easCommandParameters = nil;
}
}
self = [[[NSString alloc] initWithBytes:buf length:(j) * sizeof(wchar_t) encoding:NSUTF32StringEncoding] autorelease];
self = [[NSString alloc] initWithBytesNoCopy: buf
length: (j*sizeof(wchar_t))
encoding: NSUTF32StringEncoding
freeWhenDone: YES];
if (buf) free(buf);
return self;
return [self autorelease];
}
- (NSString *) sanitizedServerIdWithType: (SOGoMicrosoftActiveSyncFolderType) folderType