diff --git a/ChangeLog b/ChangeLog index 3f6e07cb2..404ab4466 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-03-02 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoComponentOccurence.m + ([SOGoComponentOccurence -setComponent:newComponent]): retain the + component's parent instead of the component itself, which is + already retain by its parent anyway. See 2009-02-06 from me below. + ([SOGoComponentOccurence -setMasterComponent:newMaster]): no + longer retain the "master" occurence since its parent is already + retained. + 2009-03-02 Ludovic Marcotte * SoObjects/SOGo/SOGoObject.m diff --git a/SoObjects/Appointments/SOGoComponentOccurence.h b/SoObjects/Appointments/SOGoComponentOccurence.h index 57c88876b..a09a48ea5 100644 --- a/SoObjects/Appointments/SOGoComponentOccurence.h +++ b/SoObjects/Appointments/SOGoComponentOccurence.h @@ -27,6 +27,7 @@ @class NSException; +@class iCalCalendar; @class iCalRepeatableEntityObject; @class SOGoCalendarComponent; @@ -40,6 +41,7 @@ @interface SOGoComponentOccurence : SOGoObject { + iCalCalendar *parentCalendar; iCalRepeatableEntityObject *component; iCalRepeatableEntityObject *master; BOOL isNew; diff --git a/SoObjects/Appointments/SOGoComponentOccurence.m b/SoObjects/Appointments/SOGoComponentOccurence.m index 58d65eb2b..27ff7cce5 100644 --- a/SoObjects/Appointments/SOGoComponentOccurence.m +++ b/SoObjects/Appointments/SOGoComponentOccurence.m @@ -66,6 +66,7 @@ { if ((self = [super init])) { + parentCalendar = nil; component = nil; master = nil; isNew = NO; @@ -86,8 +87,7 @@ - (void) dealloc { - [component release]; - [master release]; + [parentCalendar release]; [super dealloc]; } @@ -117,12 +117,13 @@ - (void) setComponent: (iCalRepeatableEntityObject *) newComponent { - ASSIGN (component, newComponent); + component = newComponent; + ASSIGN (parentCalendar, [component parent]); } - (void) setMasterComponent: (iCalRepeatableEntityObject *) newMaster { - ASSIGN (master, newMaster); + master = newMaster; } - (NSArray *) aclsForUser: (NSString *) uid