简体   繁体   中英

Storyboard view controller leaks

I'm having leaks and I can't figure out how to fix them. You'll find below the Instruments screenshot.

在此处输入图片说明

And that's the piece of code triggering most of them.

在此处输入图片说明

Is there any other way to instantiate a view controller that wouldn't create leaks?

You should check what are you actually leaking - generation analysis is a good start.

My guess is that UIKit might leak some strings and dictionaries which, in my experience, somewhat expected when using nibs or storyboards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM