Skip to content

Instantly share code, notes, and snippets.

View TheCoordinator's full-sized avatar
📱

Peyman Khanjan TheCoordinator

📱
View GitHub Profile
@TheCoordinator
TheCoordinator / dealloc-breakpoint.md
Created November 3, 2022 16:47 — forked from eneko/dealloc-breakpoint.md
Xcode UIViewController dealloc breakpoint

Xcode deinit breakpoint for UIViewController

This breakpoint provides an easy way to track view controller deinitialization (deallocation) in UIKit-based applications. This can help finding memory leaks caused by retain cycles preventing view controllers from being deinitialized when dismissed or popped.

From Cédric Luthi's tweet in 2017:

Useful Xcode breakpoint. When you dismiss a controller and you don’t hear the pop sound (or see the log), you probably have a retain cycle.