I was debugging my application that uses Firebase to leak memory, and after a while digging into my code, I found that the actual problem is FIRApp.configure() inside my application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) in AppDelegate.
As far as I know, everything is configured correctly, I use cocoa pods to install and update firebase. I also change my Bar status inside my AppDelegate, the code is as follows:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { FIRApp.configure() setStatusBarBackgroundColor(UIColor(red: 231/250, green: 97/250, blue: 44/250, alpha: 1.0)) // Override point for customization after application launch. return true } var window: UIWindow? override init() { } func setStatusBarBackgroundColor(color: UIColor) { guard let statusBar = UIApplication.sharedApplication().valueForKey("statusBarWindow")?.valueForKey("statusBar") as? UIView else { return } statusBar.backgroundColor = color }
I also show a tooling tool to show more details about the leak:

And I'm sure this is FIRApp.configure() , because I deleted it for testing and there were no leaks.
Hope anyone has an idea how to fix this leak, thanks.
source share