MENU

Fun & Interesting

Tracking Down Memory Leaks with Instruments - CueCam Devlog 2 #xcode #swift

CueCam Presenter 283 lượt xem 2 weeks ago
Video Not Working? Fix It Now

In this video, Michael Forrest shares his experience of using Apple's Instruments, a profiling tool in Xcode, to diagnose and resolve a memory leak issue causing his iPad app, Video Pencil, to crash on older devices. He explains how Video Pencil, an app that allows drawing on Zoom, was being used with Ecamm Live to create a virtual camera for Zoom sessions. Michael details his process of testing on an older iPad, where he successfully replicated the crash by drawing and zooming extensively.

He discovers a memory leak that was causing the app to exceed memory limits, leading to crashes. By enabling Malloc Stack Logging and using the Leaks instrument, Michael was able to identify the problematic line of code. He explains how he was inadvertently creating a new metal texture for every drawing stroke, which overwhelmed older devices. By optimizing the code to reuse the same metal texture, he resolved the issue, improving the app's performance on older iPads

Comment