mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-29 01:52:45 +00:00
Monotone-Parent: e68a1439ae451b39e7dc057e67708f2af5fcc040
Monotone-Revision: 1d41463c98c6e569d444ae5521059b400945db56 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-10-10T18:30:30 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2009-10-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* Main/SOGo.m (-init): released "rm" when no longer needed.
|
||||
(-dispatchRequest:): simplified leak catching code.
|
||||
|
||||
2009-10-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/LDAPSource.m (-_searchAttributes): we already
|
||||
|
||||
24
Main/SOGo.m
24
Main/SOGo.m
@@ -147,6 +147,7 @@ static BOOL debugObjectAllocation = NO;
|
||||
/* setup resource manager */
|
||||
rm = [[WEResourceManager alloc] init];
|
||||
[self setResourceManager:rm];
|
||||
[rm release];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -406,9 +407,9 @@ static BOOL debugObjectAllocation = NO;
|
||||
- (WOResponse *) dispatchRequest: (WORequest *) _request
|
||||
{
|
||||
static NSArray *runLoopModes = nil;
|
||||
static BOOL debugOn = NO;
|
||||
WOResponse *resp;
|
||||
NSDate *startDate, *endDate;
|
||||
NSAutoreleasePool *pool;
|
||||
|
||||
if (debugRequests)
|
||||
{
|
||||
@@ -420,9 +421,15 @@ static BOOL debugObjectAllocation = NO;
|
||||
cache = [SOGoCache sharedCache];
|
||||
if (debugLeaks)
|
||||
{
|
||||
GSDebugAllocationActive (YES);
|
||||
GSDebugAllocationList (NO);
|
||||
pool = [NSAutoreleasePool new];
|
||||
if (debugOn)
|
||||
{
|
||||
NSLog (@"allocated classes:\n%s", GSDebugAllocationList (YES));
|
||||
}
|
||||
else
|
||||
{
|
||||
debugOn = YES;
|
||||
GSDebugAllocationActive (YES);
|
||||
}
|
||||
}
|
||||
|
||||
resp = [super dispatchRequest: _request];
|
||||
@@ -435,15 +442,6 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user