Fixed memory leaks in SOGoSyncCacheObject and correctly kill the cache upon each EAS iteration

pull/69/merge
Ludovic Marcotte 2014-12-22 19:59:33 -05:00
parent 72732879fa
commit 255bcbe92f
4 changed files with 11 additions and 6 deletions

View File

@ -55,7 +55,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[o setUID: theUID];
[o setSequence: theSequence];
return o;
return [o autorelease];
}
- (void) dealloc

View File

@ -43,10 +43,6 @@
@implementation SOGoMailBaseObject
#if 0
static BOOL debugOn = YES;
#endif
- (id) initWithImap4URL: (NSURL *) _url
inContainer: (id) _container
{

View File

@ -123,6 +123,9 @@
return label;
}
//
// Set SOGoDebugLeaks = YES in your defaults to enable.
//
+ (void) memoryStatistics
{
Class *classList = GSDebugAllocationClassList ();

View File

@ -21,6 +21,8 @@
#import <Foundation/NSBundle.h>
#import <SOGo/SOGoCache.h>
#import <SOGo/NSObject+Utilities.h>
#import <SOGo/SOGoFolder.h>
#import <NGObjWeb/NSException+HTTP.h>
@ -54,13 +56,17 @@
ex = [dispatcher dispatchRequest: request inResponse: response context: context];
//[[self class] memoryStatistics];
if (ex)
{
return [NSException exceptionWithHTTPStatus: 500];
}
RELEASE(dispatcher);
[[SOGoCache sharedCache] killCache];
return response;
}