Fix memory issue with initWithObjects:... Rudimentary test now passing

This commit is contained in:
Gregory John Casamento 2019-06-08 09:38:14 -04:00
parent 48cf585c46
commit e44bdf6718
2 changed files with 14 additions and 3 deletions

View file

@ -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