Block uses copy modifier
Copy copies blocks from the stack to the heap. What happens?
First declare the following in the Person class:
- No external variables are used in blocks
- Blocks use external variables
Similar:
NSString
Whether to usecopy
orstrong
To modify?
As you can see, for immutable strings, both strong and copy strings refer to the address of the original NSString.
NSMutableString
copy
NSString
copy