Monotone-Parent: aa77eb2904bbe4270428126e707735db8d28bea4
Monotone-Revision: 2da3fdffb894897d29ea164dddd960be3c7f92bf Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-02-06T20:12:42 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
03ef2ce3f3
commit
1585c3daab
|
@ -1,5 +1,11 @@
|
||||||
2009-02-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2009-02-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* Main/SOGo.m ([SOGo +initialize]): added handling of the
|
||||||
|
"SOGoDebugLeaks" configuration variable.
|
||||||
|
([SOGo -dispatchRequest:_request]): log the classes of instances
|
||||||
|
that were leaked between the handling of the request, if
|
||||||
|
SOGoDebugLeaks is set.
|
||||||
|
|
||||||
* SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder
|
* SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder
|
||||||
-aclsForUser:uidforObjectAtPath:objectPathArray]): cache an empty
|
-aclsForUser:uidforObjectAtPath:objectPathArray]): cache an empty
|
||||||
array if not acl have been returned for the specified user.
|
array if not acl have been returned for the specified user.
|
||||||
|
|
20
Main/SOGo.m
20
Main/SOGo.m
|
@ -19,6 +19,7 @@
|
||||||
02111-1307, USA.
|
02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSAutoreleasePool.h>
|
||||||
#import <Foundation/NSDebug.h>
|
#import <Foundation/NSDebug.h>
|
||||||
#import <Foundation/NSData.h>
|
#import <Foundation/NSData.h>
|
||||||
#import <Foundation/NSDate.h>
|
#import <Foundation/NSDate.h>
|
||||||
|
@ -64,6 +65,7 @@ static unsigned int vMemSizeLimit = 0;
|
||||||
static BOOL doCrashOnSessionCreate = NO;
|
static BOOL doCrashOnSessionCreate = NO;
|
||||||
static BOOL hasCheckedTables = NO;
|
static BOOL hasCheckedTables = NO;
|
||||||
static BOOL debugRequests = NO;
|
static BOOL debugRequests = NO;
|
||||||
|
static BOOL debugLeaks = NO;
|
||||||
|
|
||||||
#ifdef GNUSTEP_BASE_LIBRARY
|
#ifdef GNUSTEP_BASE_LIBRARY
|
||||||
static BOOL debugObjectAllocation = NO;
|
static BOOL debugObjectAllocation = NO;
|
||||||
|
@ -91,6 +93,7 @@ static BOOL debugObjectAllocation = NO;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
debugRequests = [ud boolForKey: @"SOGoDebugRequests"];
|
debugRequests = [ud boolForKey: @"SOGoDebugRequests"];
|
||||||
|
debugLeaks = [ud boolForKey: @"SOGoDebugLeaks"];
|
||||||
/* vMem size check - default is 200MB */
|
/* vMem size check - default is 200MB */
|
||||||
|
|
||||||
tmp = [ud objectForKey: @"SxVMemLimit"];
|
tmp = [ud objectForKey: @"SxVMemLimit"];
|
||||||
|
@ -394,6 +397,7 @@ static BOOL debugObjectAllocation = NO;
|
||||||
static NSArray *runLoopModes = nil;
|
static NSArray *runLoopModes = nil;
|
||||||
WOResponse *resp;
|
WOResponse *resp;
|
||||||
NSDate *startDate, *endDate;
|
NSDate *startDate, *endDate;
|
||||||
|
NSAutoreleasePool *pool;
|
||||||
|
|
||||||
if (debugRequests)
|
if (debugRequests)
|
||||||
{
|
{
|
||||||
|
@ -403,6 +407,13 @@ static BOOL debugObjectAllocation = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache = [SOGoCache sharedCache];
|
cache = [SOGoCache sharedCache];
|
||||||
|
if (debugLeaks)
|
||||||
|
{
|
||||||
|
GSDebugAllocationActive (YES);
|
||||||
|
GSDebugAllocationList (NO);
|
||||||
|
pool = [NSAutoreleasePool new];
|
||||||
|
}
|
||||||
|
|
||||||
resp = [super dispatchRequest: _request];
|
resp = [super dispatchRequest: _request];
|
||||||
[SOGoCache killCache];
|
[SOGoCache killCache];
|
||||||
|
|
||||||
|
@ -413,6 +424,15 @@ static BOOL debugObjectAllocation = NO;
|
||||||
[endDate timeIntervalSinceDate: startDate]];
|
[endDate timeIntervalSinceDate: startDate]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (debugLeaks)
|
||||||
|
{
|
||||||
|
[resp retain];
|
||||||
|
[pool release];
|
||||||
|
[resp autorelease];
|
||||||
|
NSLog (@"allocated classes:\n%s", GSDebugAllocationList (YES));
|
||||||
|
GSDebugAllocationActive (NO);
|
||||||
|
}
|
||||||
|
|
||||||
if (![self isTerminating])
|
if (![self isTerminating])
|
||||||
{
|
{
|
||||||
if (!runLoopModes)
|
if (!runLoopModes)
|
||||||
|
|
Loading…
Reference in New Issue