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.

Комментарии • 4

  • @pradeepsagar4312
    @pradeepsagar4312 4 года назад +1

    Marvellous :) it help a lot.Now my understanding on copy is clear. Thanks a lot.

    • @ericrosko
      @ericrosko  4 года назад

      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.

  • @aharonkreiter1833
    @aharonkreiter1833 9 лет назад

    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

  • @RiverOfTen
    @RiverOfTen 10 лет назад

    Excellent explanation of copy vs strong semantics when dealing with objects that have mutable subclasses. Thank you!