Why you might use copy instead of strong in an Objective-c @property
HTML-код
- Опубликовано: 25 июн 2024
- This video covers the use of the objective-c @property attribute 'copy'. There is some confusion as to why you would use copy, and I try and illustrate how not using copy can still leave your class open to changes, even if you have a reference to an immutable NSString.
My twitter feed:
/ ericrosko
Thanks.
Marvellous :) it help a lot.Now my understanding on copy is clear. Thanks a lot.
Glad it helped and thanks for checking out my old video! It's been a while since I've gotten a comment. I only wish I had time to do more of these.
Great tutorial! Helped me understand it a little bit better!
I love the part where you say, "So, poor Bob. He didn't know anyone could change his data." XD
Excellent explanation of copy vs strong semantics when dealing with objects that have mutable subclasses. Thank you!