开发者

how to release objects in programs based on UITabBarController?

开发者 https://www.devze.com 2023-03-03 21:43 出处:网络
开发者_如何转开发I want to release objects in my programming based on UITabBarControllers, all tab bar items launches together at once,
开发者_如何转开发

I want to release objects in my programming based on UITabBarControllers, all tab bar items launches together at once,

so what should I do for this??


Just release all what you retained. I think dealloc will be called when necessary.

Maybe this will help you a bit:

Dealloc not called for ViewController; it's about why dealloc is not called when using UITabBarCtrlr.


You can still release anything that you retained, you don't have to do it in dealloc. Just recycle anything anywhere that you want to, and set the object to nil. In dealloc, don't release anything that is nil so you are safe. However, your UITabBarController might still assume the validity of the objects, so it's up to you for implementing the logic.

If possible, you should just allocate a new UITabBarController.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号