Completion Block question


#1

Thank you for the wonderful book of tutorials.

The completion block in the sample code has me scratching my head and reviewing the rules for blocks in the previous chapter. Can someone please clear up my mis-understanding as I surely have missed some subtlety:

In Chapter 27, section:

For the More Curious: The __block Modifier, Abbreviated Syntax, and Memory

The book states:

[quote][A] captured variable cannot be changed within the block. … When capturing a pointer to an object, you can always change the properties of that object, but you cannot change what object the pointer points to.
[/quote]

For the completion block in the sample code in chapter 28, 1) is “channel” not a captured variable? and 2) is it not being told to point to something new? What did I miss?


#2

Ah, sorry: instance variables can always be changed inside a block.