Here is the practical difference for your first point:
If I pass the scalar to the block used in the GCD queue, then inside the block I work with a copy of the source data. Changes will not be visible outside the block. (There are warnings here, the __block modifier, but overall this is correct.)
If I pass, say, NSMutableDictionary into a block, the changes in the dictionary will be visible outside the block - this is because you saved the link to the dictionary and did not take a deep copy.
In any case, memory management is performed for you, that is, the copied or copied variable is saved.
Since you cannot change the contents of an NSDictionary after it is initialized, you will probably find that the blocks automatically do the “Right Thing” for you.
At the second point, memory management is pretty automatic, unless you need to work with a copy of a mutable object.
Stephen darlington
source share