diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index 41fa9a3d0..62cb4a123 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -18,6 +18,7 @@ * Boston, MA 02111-1307, USA. */ +#import #import #import @@ -650,6 +651,7 @@ matchingURLs: (id ) refs toResponse: (WOResponse *) response { + NSAutoreleasePool *pool; NSObject *element; NSString *url, *baseURL, *cname, *domain; NSString **propertiesArray; @@ -668,9 +670,10 @@ propertiesCount = [properties count]; max = [refs length]; - buffer = [NSMutableString stringWithCapacity: max*512]; + buffer = [[NSMutableString alloc] initWithCapacity: max*512]; domain = [[context activeUser] domain]; connection = [source connection]; + pool = [[NSAutoreleasePool alloc] init]; for (count = 0; count < max; count++) { element = [refs objectAtIndex: count]; @@ -688,8 +691,15 @@ else [self appendMissingObjectRef: url toBuffer: buffer]; + if (count % 10 == 0) + { + RELEASE(pool); + pool = [[NSAutoreleasePool alloc] init]; + } } + RELEASE(pool); [response appendContentString: buffer]; + RELEASE(buffer); // NSLog (@"/adding properties with url"); NSZoneFree (NULL, propertiesArray); diff --git a/SoObjects/SOGo/SQLSource.m b/SoObjects/SOGo/SQLSource.m index 6ffd63b93..8465752d0 100644 --- a/SoObjects/SOGo/SQLSource.m +++ b/SoObjects/SOGo/SQLSource.m @@ -1,6 +1,6 @@ /* SQLSource.h - this file is part of SOGo * - * Copyright (C) 2009-2020 Inverse inc. + * Copyright (C) 2009-2021 Inverse inc. * * This file is part of SOGo. *