Monotone-Parent: 1d41463c98c6e569d444ae5521059b400945db56

Monotone-Revision: 33d9fe1bf74ac6ca66a70020477a738afbd9c379

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-10-10T18:33:37
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2009-10-10 18:33:37 +00:00
parent a7b876c87a
commit 942bcb816e
3 changed files with 21 additions and 5 deletions

View File

@ -557,10 +557,15 @@
- (id) copyWithZone: (NSZone *) aZone
{
CardElement *new;
NSString *newTag, *newGroup;
new = [[self class] new];
[new setTag: [tag copyWithZone: aZone]];
[new setGroup: [group copyWithZone: aZone]];
newTag = [tag copyWithZone: aZone];
[new setTag: newTag];
[newTag release];
newGroup = [group copyWithZone: aZone];
[new setGroup: newGroup];
[newGroup release];
[new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]];
[new setAttributesAsCopy: [self deepCopyOfDictionary: attributes
withZone: aZone]];
@ -572,10 +577,15 @@
- (id) mutableCopyWithZone: (NSZone *) aZone
{
CardElement *new;
NSString *newTag, *newGroup;
new = [[self class] new];
[new setTag: [tag mutableCopyWithZone: aZone]];
[new setGroup: [group mutableCopyWithZone: aZone]];
newTag = [tag copyWithZone: aZone];
[new setTag: newTag];
[newTag release];
newGroup = [group copyWithZone: aZone];
[new setGroup: newGroup];
[newGroup release];
[new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]];
[new setAttributesAsCopy: [self deepCopyOfDictionary: attributes
withZone: aZone]];

View File

@ -1,3 +1,9 @@
2009-10-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* CardElement.m (-copyWithZone:): we release the "tag" and the
"group" copy to avoid a leak.
(-mutableCopyWithZone): same as above.
2009-09-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* NSArray+NGCards.m (-renderedForCards): insert the non-blank

View File

@ -95,7 +95,7 @@
- (id) initEndTag: (NSString *) _tag
{
type = 'E';
tagName = [_tag copy];
ASSIGN (tagName, _tag);
return self;
}