Skip to content

Instantly share code, notes, and snippets.

@uc-compass-bot
Created October 15, 2019 14:17
Show Gist options
  • Save uc-compass-bot/3d3404f48bff0df5e6b6a382d5df01d7 to your computer and use it in GitHub Desktop.
Save uc-compass-bot/3d3404f48bff0df5e6b6a382d5df01d7 to your computer and use it in GitHub Desktop.
Catch Retain Cycles In Navigation Controller Subclass
import UIKit
class NavigationController: UINavigationController {
override func popViewController(animated: Bool) -> UIViewController? {
let viewController = super.popViewController(animated: animated)
MemoryChecker.verifyDealloc(object: viewController)
return viewController
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment