When is it RISKY to use [unowned self] inside a closure? 🤨

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 9

  • @v_pradeilles
    @v_pradeilles  2 роки тому +3

    Did you find this explanation useful? What are your thoughts on using [unowned self]? Let me know in the comments 🚀

  • @xNiqueish
    @xNiqueish 11 місяців тому

    Clear and on point. Good video!

  • @muncho404
    @muncho404 2 роки тому

    Explanation ability on point✅

  • @emrehavan7456
    @emrehavan7456 2 роки тому +1

    Nice and brief explanation! Thanks for the video.

  • @lucasdebritoarruda7831
    @lucasdebritoarruda7831 2 роки тому

    Excellent video. Best regards from Brazil.

  • @jeremymagnier
    @jeremymagnier 2 роки тому +3

    Hi, thanks for the video
    I think unowned can be useful for better comprehension of the code.
    For example, i will put unowned self on updateUI in the viewDidLoad, and weak self on the closure of fetchData instead.
    This clearly indicates what may or may not happen for a new developper on the project

    • @v_pradeilles
      @v_pradeilles  2 роки тому +1

      It’s indeed a good example of where using unowned shouldn’t be able to create a crash 👍

  • @thomasjhartnett
    @thomasjhartnett 2 роки тому +1

    Thanks for this video. I’m also not a fan of using unowned self for the reason you mentioned. It’s just too hard (and sometimes impossible) to know for sure it is safe.

    • @GBiboux
      @GBiboux 2 роки тому

      Possible with unit test