mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +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;
|
||||
RETAIN(obj);
|
||||
GSIArrayAddItem(&array, item);
|
||||
}
|
||||
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
|
||||
|
||||
@implementation GSMutableOrderedSet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue