I’ve read through the chapter on blocks a few times, maybe 5 now, but I still feel as if I’m not following what’s going on. I’ve got it figured out up till the discussion on “Memory Management”.
What’s confusing me to begin with is why a block would need to live longer than the current stack frame would allow. The book mentions that “it (a block) could become an instance of a variable object” and that it must be copied to the heap if that’s the case. I’m not sure I’m understanding how a block would be an instance variable of an object. Perhaps you could give me an example of this?
There are other sections within this area that I’m not clear on so I may follow up on those if that’s Ok? However this is stumping me as I can’t visualise this at all.