mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(calendar): Memory optimization on _appendCycleException
This commit is contained in:
@@ -1075,6 +1075,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
withTimeZone: (NSTimeZone *) tz
|
||||
toArray: (NSMutableArray *) ma
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
NGCalendarDateRange *recurrenceIdRange;
|
||||
NSCalendarDate *recurrenceId, *masterEndDate, *endDate;
|
||||
NSMutableDictionary *newRecord;
|
||||
@@ -1162,6 +1165,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
endDate: [newRecord objectForKey: @"endDate"]];
|
||||
if ([dateRange doesIntersectWithDateRange: newRecordRange])
|
||||
[ma addObject: newRecord];
|
||||
|
||||
else
|
||||
newRecord = nil;
|
||||
} else {
|
||||
@@ -1184,6 +1188,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
[self _fixExceptionRecord: newRecord fromRow: row];
|
||||
}
|
||||
|
||||
DESTROY(pool);
|
||||
|
||||
// We finally adjust the c_nextalarm
|
||||
[self _computeAlarmForRow: (id)row
|
||||
master: component];
|
||||
|
||||
Reference in New Issue
Block a user