Post B5IK5SvCOnk4TpM00W by jrose@belkadan.com
(DIR) More posts by jrose@belkadan.com
(DIR) Post #B5IK5SvCOnk4TpM00W by jrose@belkadan.com
1 likes, 0 repeats
Talking idly with a coworker about how you could add cleanup code to an Apple Blocks Extension block from just C code:Use ObjC or C++ for -dealloc/destructors (the correct answer)Maybe __attribute__((cleanup)) on a __block variable would work, maybe it wouldn'tUse objc_setAssociatedObject. But with what object, if we can't use Objective-C? A CFData with custom callbacks would do it!