grand central dispatch - GCD objects as Objective-C objects -


grand central dispatch objects said behave objective-c objects when compiled objective-c compiler. that's little unclear me.

objective-c objects are, in fact, structures have, @ least, 1 field: pointer (the isa pointer) object's class structure. other fields, if any, correspond object's ivars.

so, can gcd objects casted structures first field pointer objective-c class structure? since dispatch objects participate in arc, compiler do: send retain , release messages objects (like objc_msgsend(obj, @selector(retain)), example) or generate dispatch_object_retain , dispatch_object_release calls? mean, gcd objects respond objc messages in [obj mesg] fashion?

gcd objects actual objects, , compiler doesn't treat them specially. can add them cocoa collections, po them in debugger, etc...

however, runtime bit of special handling them. isa pointer points dispatch vtable rather regular objc class.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -