How to spot and fix memory leak, retain cycle and erratic crashes

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • IffIn this video, we learn about the common areas where leaks happen
    - closures
    - delegates
    - notification centers
    - disposeBag/anyCancellables in table/collection view cells
    And how to resolve them using
    - memory graph on XCode
    - leakedViewControllerDetector github.com/Janneman84/LeakedV...
    Thank you Jan de Vries & Janneman84 for the awesome tool.
    Binding combine with table view cell
    • How to bind tableView ...
    Source code
    github.com/kelvinfok/memory-l... (lastest commit contains the fix)
    0:00 - Intro
    1:40 - Project walkthrough
    08:14 - Memory graph
    09:04 - Function fired multiple times
    09:45 - Common areas where leaks happen
    13:55 - LeakedViewControllerDetector introduction and installation
    16:50 - Fix Notification Center leak
    19:34 - Fix closure retain cycle
    20:55 - Fix retain cycle in tableviewcell (disposeBag/anyCancellables)
    22:30 - Fix retain cycle in delegates
    23:55 - Using memory graph to confirm fixes
    24:30 - Closing
    Master the skills to become a senior iOS developer
    ➡️ www.udemy.com/course/ios-swif...
    Build a Swift Package Manager library
    ➡️ www.udemy.com/course/ios-15-s...
    Build a finance stocks app
    ➡️ www.udemy.com/course/ios-14-s...
    Build a ToDoList app with Firebase
    ➡️ www.udemy.com/course/build-a-...
    Send emails inApp with Sendgrid API
    ➡️ www.udemy.com/course/ios-13-s...
    Build a weather app with Alamofire 5 and REST API
    ➡️ www.udemy.com/course/ios-13-s...
    Build onboarding flows with Lottie animations
    ➡️ www.udemy.com/course/ios-swif...
    Build a basic onboarding flow for beginners
    ➡️ www.udemy.com/course/ios-swif...
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 5

  • @ShaikhAbdulMajid-dq2xc
    @ShaikhAbdulMajid-dq2xc 28 วันที่ผ่านมา

    Thanks Sir, This help alot, Appreciated!

  • @payambassi8784
    @payambassi8784 ปีที่แล้ว +1

    Great video thanks

  • @jisanson
    @jisanson ปีที่แล้ว

    good video, thanks

  • @robert.ios.developer
    @robert.ios.developer 8 หลายเดือนก่อน

    Hi, the video was great.
    Can someone please explain, why do we have to store the cancellables inside the cell?
    I would normally have my cancellables on the viewController.