From 715307143880083daa5f07ac0cf1bd4b428beb14 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 15 Dec 2008 22:26:50 +0000 Subject: [PATCH] Monotone-Parent: b58720a684a944a07a55afee823cab4819feaead Monotone-Revision: 6a659b3123531a244f7d3ef9cfe8ccae60383bc0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-12-15T22:26:50 Monotone-Branch: ca.inverse.sogo --- SOPE/NGCards/CardElement.m | 31 +++++++++++++------------------ SOPE/NGCards/ChangeLog | 5 +++++ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/SOPE/NGCards/CardElement.m b/SOPE/NGCards/CardElement.m index a20f65e7e..4b0415bae 100644 --- a/SOPE/NGCards/CardElement.m +++ b/SOPE/NGCards/CardElement.m @@ -105,17 +105,17 @@ - (void) dealloc { - if (tag) - [tag release]; - [values release]; +// [parent release]; + [tag release]; + [group release]; [attributes release]; - [parent release]; + [values release]; [super dealloc]; } - (void) setParent: (CardGroup *) aParent { - ASSIGN (parent, aParent); + parent = aParent; } - (id) parent @@ -128,6 +128,11 @@ ASSIGN (tag, aTag); } +- (NSString *) tag +{ + return tag; +} + - (void) setGroup: (NSString *) aGroup { ASSIGN (group, aGroup); @@ -216,11 +221,6 @@ [self addAttribute: @"type" value: aType]; } -- (NSString *) tag -{ - return tag; -} - - (NSArray *) values { return values; @@ -493,16 +493,12 @@ - (void) setValuesAsCopy: (NSMutableArray *) someValues { - [values release]; - values = someValues; - [values retain]; + ASSIGN (values, someValues); } - (void) setAttributesAsCopy: (NSMutableDictionary *) someAttributes { - [attributes release]; - attributes = someAttributes; - [attributes retain]; + ASSIGN (attributes, someAttributes); } - (CardGroup *) searchParentOfClass: (Class) parentClass @@ -537,6 +533,7 @@ { newChild = [[oldArray objectAtIndex: count] mutableCopyWithZone: aZone]; [newArray addObject: newChild]; + [newChild release]; } return newArray; @@ -565,7 +562,6 @@ new = [[self class] new]; [new setTag: [tag copyWithZone: aZone]]; [new setGroup: [group copyWithZone: aZone]]; - [new setParent: nil]; [new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]]; [new setAttributesAsCopy: [self deepCopyOfDictionary: attributes withZone: aZone]]; @@ -581,7 +577,6 @@ new = [[self class] new]; [new setTag: [tag mutableCopyWithZone: aZone]]; [new setGroup: [group mutableCopyWithZone: aZone]]; - [new setParent: nil]; [new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]]; [new setAttributesAsCopy: [self deepCopyOfDictionary: attributes withZone: aZone]]; diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index a137c046a..4191fcce8 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,8 @@ +2008-12-15 Wolfgang Sourdeau + + * CardElement.m ([CardElement -setParent:aParent]): no longer + retain the parent passed as parameter. + 2008-12-10 Wolfgang Sourdeau * iCalYearlyRecurrenceCalculator.m