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

  Переглядів 1,673

Kelvin Fok

Kelvin Fok

День тому

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...

КОМЕНТАРІ: 4
@payambassi8784
@payambassi8784 11 місяців тому
Great video thanks
@robert.ios.developer
@robert.ios.developer 5 місяців тому
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.
@jisanson
@jisanson 9 місяців тому
good video, thanks
Memory Leaks in iOS: Find, Diagnose, & Fix (2022)
12:44
iOS Academy
Переглядів 44 тис.
Memory 2 - Finding and Fixing Memory Leaks (iOS, Xcode 9, Swift 4)
34:31
Mark Moeykens
Переглядів 49 тис.
Анита просто на химии, поэтому такая сильная
00:21
Женя Лизогуб SHORTS
Переглядів 2,8 млн
Артем Пивоваров х Klavdia Petrivna - Барабан
03:16
Artem Pivovarov
Переглядів 5 млн
BMW просто издевается над нами! Силы на исходе…
1:34:41
ИЛЬДАР АВТО-ПОДБОР
Переглядів 3,4 млн
Weak and Unowned Self Closure Memory Leak Fixes
12:21
Lets Build That App
Переглядів 55 тис.
Getting started with iOS modularization by Luka Terzić
23:48
Infinum
Переглядів 3,3 тис.
Retain Cycles: How to Detect with Instruments Profiler!
13:55
Lets Build That App
Переглядів 47 тис.
I adopted this cat. Then I got the bad news.
4:32
GeoBeats Animals
Переглядів 1 млн
Stubbing API with OHHTTPStubs (including API testing)
23:04
Swift Closures Explained - The ONLY video you'll ever need!
17:33
Get Swifty
Переглядів 3,8 тис.
JavaScript Fighting Game Tutorial with HTML Canvas
3:56:20
Chris Courses
Переглядів 5 млн
Here's the ULTIMATE tip to find memory leaks in Xcode!
5:41
Vincent Pradeilles
Переглядів 12 тис.
комната 2х девочек #трислонамебель #interiordesign
1:01
Три Слона Мебель
Переглядів 4,2 млн
МОРСКИЕ РАЧКИ С ВАЙЛДБЕРИЗ ЧАСТЬ 2
0:46
Натали Макколи
Переглядів 7 млн
Как перестать есть сладкое!
0:11
Victoria Portfolio
Переглядів 1,4 млн