Monotone-Parent: b58720a684a944a07a55afee823cab4819feaead

Monotone-Revision: 6a659b3123531a244f7d3ef9cfe8ccae60383bc0

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-12-15T22:26:50
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2008-12-15 22:26:50 +00:00
parent 2c95b16712
commit 7153071438
2 changed files with 18 additions and 18 deletions

View File

@ -105,17 +105,17 @@
- (void) dealloc - (void) dealloc
{ {
if (tag) // [parent release];
[tag release]; [tag release];
[values release]; [group release];
[attributes release]; [attributes release];
[parent release]; [values release];
[super dealloc]; [super dealloc];
} }
- (void) setParent: (CardGroup *) aParent - (void) setParent: (CardGroup *) aParent
{ {
ASSIGN (parent, aParent); parent = aParent;
} }
- (id) parent - (id) parent
@ -128,6 +128,11 @@
ASSIGN (tag, aTag); ASSIGN (tag, aTag);
} }
- (NSString *) tag
{
return tag;
}
- (void) setGroup: (NSString *) aGroup - (void) setGroup: (NSString *) aGroup
{ {
ASSIGN (group, aGroup); ASSIGN (group, aGroup);
@ -216,11 +221,6 @@
[self addAttribute: @"type" value: aType]; [self addAttribute: @"type" value: aType];
} }
- (NSString *) tag
{
return tag;
}
- (NSArray *) values - (NSArray *) values
{ {
return values; return values;
@ -493,16 +493,12 @@
- (void) setValuesAsCopy: (NSMutableArray *) someValues - (void) setValuesAsCopy: (NSMutableArray *) someValues
{ {
[values release]; ASSIGN (values, someValues);
values = someValues;
[values retain];
} }
- (void) setAttributesAsCopy: (NSMutableDictionary *) someAttributes - (void) setAttributesAsCopy: (NSMutableDictionary *) someAttributes
{ {
[attributes release]; ASSIGN (attributes, someAttributes);
attributes = someAttributes;
[attributes retain];
} }
- (CardGroup *) searchParentOfClass: (Class) parentClass - (CardGroup *) searchParentOfClass: (Class) parentClass
@ -537,6 +533,7 @@
{ {
newChild = [[oldArray objectAtIndex: count] mutableCopyWithZone: aZone]; newChild = [[oldArray objectAtIndex: count] mutableCopyWithZone: aZone];
[newArray addObject: newChild]; [newArray addObject: newChild];
[newChild release];
} }
return newArray; return newArray;
@ -565,7 +562,6 @@
new = [[self class] new]; new = [[self class] new];
[new setTag: [tag copyWithZone: aZone]]; [new setTag: [tag copyWithZone: aZone]];
[new setGroup: [group copyWithZone: aZone]]; [new setGroup: [group copyWithZone: aZone]];
[new setParent: nil];
[new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]]; [new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]];
[new setAttributesAsCopy: [self deepCopyOfDictionary: attributes [new setAttributesAsCopy: [self deepCopyOfDictionary: attributes
withZone: aZone]]; withZone: aZone]];
@ -581,7 +577,6 @@
new = [[self class] new]; new = [[self class] new];
[new setTag: [tag mutableCopyWithZone: aZone]]; [new setTag: [tag mutableCopyWithZone: aZone]];
[new setGroup: [group mutableCopyWithZone: aZone]]; [new setGroup: [group mutableCopyWithZone: aZone]];
[new setParent: nil];
[new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]]; [new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]];
[new setAttributesAsCopy: [self deepCopyOfDictionary: attributes [new setAttributesAsCopy: [self deepCopyOfDictionary: attributes
withZone: aZone]]; withZone: aZone]];

View File

@ -1,3 +1,8 @@
2008-12-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* CardElement.m ([CardElement -setParent:aParent]): no longer
retain the parent passed as parameter.
2008-12-10 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2008-12-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* iCalYearlyRecurrenceCalculator.m * iCalYearlyRecurrenceCalculator.m