motion-wiretap
motion-wiretap copied to clipboard
Memory management is for suckers!
It would be great if we didn't have to retain all the Wiretap
instances.
I don't yet have a clever way to avoid this unfortunate state of affairs, other than keeping some global list of wiretaps. UG to that.
How does ReactiveCocoa do it, anyone know? I'd love to mimic that.
Indeed, active signals (those with subscribers) are retained in a global list.
I'm not sure how ReactiveCocoa accomplishes the "auto shutdown" of signals that rely on notifications and key-value observation.
KVO based signals are "disposed" of when either the target or the observer are deallocated.