We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__unsafe_unretained Class previousClass = nil; __unsafe_unretained Class currentClass = object_getClass(obj);
while (previousClass != currentClass) { NSArray<id> *ivars;
if (layoutCache && currentClass) { ivars = layoutCache[currentClass]; } if (!ivars) { ivars = FBGetStrongReferencesForClass(currentClass); if (layoutCache && currentClass) { layoutCache[currentClass] = ivars; } } [array addObjectsFromArray:ivars]; previousClass = currentClass; currentClass = class_getSuperclass(currentClass);
}
return [array copy]; }
问题总结: layoutCache[currentClass] = ivars; 这行代码报的错,注释掉就能正常编译
The text was updated successfully, but these errors were encountered:
how to fix it? if you comment this line code. Did it generate an error?
Sorry, something went wrong.
可以这么改:
layoutCache[(id<NSCopying>)currentClass] = ivars;
facebook/FBRetainCycleDetector#115
No branches or pull requests
NSArray> *FBGetObjectStrongReferences(id obj, NSMutableDictionary> *> *layoutCache) { NSMutableArray> *array = [NSMutableArray new];
__unsafe_unretained Class previousClass = nil;
__unsafe_unretained Class currentClass = object_getClass(obj);
while (previousClass != currentClass) {
NSArray<id> *ivars;
}
return [array copy];
}
问题总结:
layoutCache[currentClass] = ivars; 这行代码报的错,注释掉就能正常编译
The text was updated successfully, but these errors were encountered: