-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
Description
For example :
- (NSSet *)protocols {
if (!_protocols) {
Protocol *__unsafe_unretained *protocols;
uint protocolsCount = 0;
protocols = class_copyProtocolList(_objcClass, &protocolsCount);
NSMutableSet *mutableProtocols = [NSMutableSet setWithCapacity:protocolsCount];
for (uint protocolIndex = 0; protocolIndex != protocolsCount; ++protocolIndex) {
Protocol *protocol = protocols[protocolIndex];
[mutableProtocols addObject:protocol];
}// What makes you sure "protocols" variable is not NULL ?
free(protocols);
_protocols = [NSSet setWithSet:mutableProtocols];
}
return _protocols;
}Reactions are currently unavailable