-
Advancements in the Objective-C runtime
Dive into the microscopic world of low-level bits and bytes that underlie every Objective-C and Swift class. Find out how recent changes to internal data structures, method lists, and tagged pointers provide better performance and lower memory usage. We'll demonstrate how to recognize and fix crashes in code that depend on internal details, and show you how to keep your code unaffected by changes to the runtime.
Ressources
Vidéos connexes
WWDC20
-
Rechercher dans cette vidéo…
-
-
5:37 - Use the heap command to calculate memory savings
heap Mail | egrep 'class_rw|COUNT' -
7:35 - Use the APIs
class_getName class_getSuperclass class_copyMethodList -
14:38 - Use the APIs
method_getName method_getTypeEncoding method_getImplementation -
21:52 - Use the APIs
if ([obj isKindOfClass:[NSString class]]) { // a string } NSUInteger length = [obj length]; if (CFGetTypeID(obj) == CFStringGetTypeID()) { // a string } CFIndex length = CFStringGetLength(obj);
-