ios - Why is block designed to be allocated on the stack unless copied? -
why has apple designed block allocated on stack unless copied? what's benefit such behavior? why not make behave regular nsobject - alloc-init , goes on heap automatically?
the reason why blocks placed on stack default speed. in common case lifetime of block less of stack function contains it, optimisation.
http://www.cocoawithlove.com/2009/10/how-blocks-are-implemented-and.html
Comments
Post a Comment