I understand that NSMutableArray shouldn't be trusted to be thread-safe, but what if I only call [array addObject:object]
and I'm not accessing the array any other way while doing so?
For example:
NSMutableArray* array = [[NSMutableArray alloc] init];
[self.subviews
enumerateObjectsWithOptions:NSEnumerationConcurrent
usingBlock:^(UIView* view, NSUInteger idx, BOOL *stop) {
if ([self methodThatReturnsBool:view]) [array addObject:view];
}];
Thanks for any advice! :)