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>
|
||||
|
||||
* 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
|
||||
-aclsForUser:uidforObjectAtPath:objectPathArray]): cache an empty
|
||||
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.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDate.h>
|
||||
|
@ -64,6 +65,7 @@ static unsigned int vMemSizeLimit = 0;
|
|||
static BOOL doCrashOnSessionCreate = NO;
|
||||
static BOOL hasCheckedTables = NO;
|
||||
static BOOL debugRequests = NO;
|
||||
static BOOL debugLeaks = NO;
|
||||
|
||||
#ifdef GNUSTEP_BASE_LIBRARY
|
||||
static BOOL debugObjectAllocation = NO;
|
||||
|
@ -91,6 +93,7 @@ static BOOL debugObjectAllocation = NO;
|
|||
}
|
||||
#endif
|
||||
debugRequests = [ud boolForKey: @"SOGoDebugRequests"];
|
||||
debugLeaks = [ud boolForKey: @"SOGoDebugLeaks"];
|
||||
/* vMem size check - default is 200MB */
|
||||
|
||||
tmp = [ud objectForKey: @"SxVMemLimit"];
|
||||
|
@ -394,6 +397,7 @@ static BOOL debugObjectAllocation = NO;
|
|||
static NSArray *runLoopModes = nil;
|
||||
WOResponse *resp;
|
||||
NSDate *startDate, *endDate;
|
||||
NSAutoreleasePool *pool;
|
||||
|
||||
if (debugRequests)
|
||||
{
|
||||
|
@ -403,6 +407,13 @@ static BOOL debugObjectAllocation = NO;
|
|||
}
|
||||
|
||||
cache = [SOGoCache sharedCache];
|
||||
if (debugLeaks)
|
||||
{
|
||||
GSDebugAllocationActive (YES);
|
||||
GSDebugAllocationList (NO);
|
||||
pool = [NSAutoreleasePool new];
|
||||
}
|
||||
|
||||
resp = [super dispatchRequest: _request];
|
||||
[SOGoCache killCache];
|
||||
|
||||
|
@ -413,6 +424,15 @@ static BOOL debugObjectAllocation = NO;
|
|||
[endDate timeIntervalSinceDate: startDate]];
|
||||
}
|
||||
|
||||
if (debugLeaks)
|
||||
{
|
||||
[resp retain];
|
||||
[pool release];
|
||||
[resp autorelease];
|
||||
NSLog (@"allocated classes:\n%s", GSDebugAllocationList (YES));
|
||||
GSDebugAllocationActive (NO);
|
||||
}
|
||||
|
||||
if (![self isTerminating])
|
||||
{
|
||||
if (!runLoopModes)
|
||||
|
|
Loading…
Reference in New Issue