From 31139cacb067d56563ebe20fce1372a1aba006c5 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 28 Apr 2010 17:57:02 +0000 Subject: [PATCH] Monotone-Parent: abf0593bed546a2a9f1b2e7b96945af8f2dd4bee Monotone-Revision: 513390dbae4bee1883ba285606980dafededd7e9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-04-28T17:57:02 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ Tools/SOGoToolBackup.m | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 644f0efd9..f8f63cfef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-28 Wolfgang Sourdeau + + * Tools/SOGoToolBackup.m (-proceed): we empty the autorelease pool + every 10 iterations to avoid an excess of unreleased LDAP + connections. + 2010-04-26 Ludovic Marcotte * Modified all folder/ACL templates in order diff --git a/Tools/SOGoToolBackup.m b/Tools/SOGoToolBackup.m index 8fcbef894..9fc85c64b 100644 --- a/Tools/SOGoToolBackup.m +++ b/Tools/SOGoToolBackup.m @@ -381,14 +381,23 @@ - (BOOL) proceed { + NSAutoreleasePool *pool; int count, max; BOOL rc; rc = YES; + pool = [NSAutoreleasePool new]; + max = [userIDs count]; for (count = 0; rc && count < max; count++) - rc = [self exportUser: [userIDs objectAtIndex: count]]; + { + rc = [self exportUser: [userIDs objectAtIndex: count]]; + if ((count % 10) == 0) + [pool emptyPool]; + } + + [pool release]; return rc; }