mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Fix memory issue with initWithObjects:... Rudimentary test now passing
This commit is contained in:
parent
48cf585c46
commit
e44bdf6718
2 changed files with 14 additions and 3 deletions
|
@ -226,12 +226,23 @@ static Class mutableSetClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.obj = obj;
|
item.obj = obj;
|
||||||
|
RETAIN(obj);
|
||||||
GSIArrayAddItem(&array, item);
|
GSIArrayAddItem(&array, item);
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) initWithObject: (id)obj
|
||||||
|
{
|
||||||
|
id objs[] = {obj};
|
||||||
|
|
||||||
|
self = [self initWithObjects: objs count: 1];
|
||||||
|
if(self == nil)
|
||||||
|
{
|
||||||
|
NSLog(@"Problem initializing with one element");
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation GSMutableOrderedSet
|
@implementation GSMutableOrderedSet
|
||||||
|
|
|
@ -1745,8 +1745,8 @@ static SEL rlSel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
- (instancetype) initWithCoder: (NSCoder *)acoder
|
||||||
{
|
{
|
||||||
return [super initWithCoder: coder];
|
return [super initWithCoder: acoder];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue