Post

Replies

Boosts

Views

Activity

Reply to UITab memory leak
Hi Richard, It appears from my limited testing sofar that this appears to be fixed in 26.4. Just let whoever fixed this know that I owe them a beer when if/when they come down to Australia!!! Legends!! I have added a reminder in 6 months time to start removing ALL the extra code I've had to add to try work around this one.
Topic: UI Frameworks SubTopic: UIKit
Apr ’26
Reply to UITab memory leak
Hi Patatrouf, I tried this and it didn't work for me. The problem in my memory graph is (as far as I can see), is that the UITab is being kept in memory NOT by the tab bar, but by a UIFloatingTabBarItemView which seems to be kept in a _subViewCache. So setting the update UITabs had no affect for me since its not the tab bar that is holding the ref. Perhaps what you're seeing is a slight variation on what is happening here? Glad your little hack worked for you, but it doesn't work for me. I have spent a couple of days trying to work around this one without much success. The only thing I can do is force dealloc all my own objects within the ViewControllers that sit inside the UITabs. This doesn't stop the ViewControllers staying in memory but at least they're using minimal memory at this stage. My code is polluted with a whole heap of extra code now, but it is what it is.
Topic: UI Frameworks SubTopic: UIKit
Feb ’26
Reply to UITab memory leak
Hi Richard, It appears from my limited testing sofar that this appears to be fixed in 26.4. Just let whoever fixed this know that I owe them a beer when if/when they come down to Australia!!! Legends!! I have added a reminder in 6 months time to start removing ALL the extra code I've had to add to try work around this one.
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Apr ’26
Reply to UITab memory leak
Hi Patatrouf, I tried this and it didn't work for me. The problem in my memory graph is (as far as I can see), is that the UITab is being kept in memory NOT by the tab bar, but by a UIFloatingTabBarItemView which seems to be kept in a _subViewCache. So setting the update UITabs had no affect for me since its not the tab bar that is holding the ref. Perhaps what you're seeing is a slight variation on what is happening here? Glad your little hack worked for you, but it doesn't work for me. I have spent a couple of days trying to work around this one without much success. The only thing I can do is force dealloc all my own objects within the ViewControllers that sit inside the UITabs. This doesn't stop the ViewControllers staying in memory but at least they're using minimal memory at this stage. My code is polluted with a whole heap of extra code now, but it is what it is.
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Feb ’26
Reply to UITab memory leak
Hi Richard, I have submitted the feedback: FB21885154 Thanks, Mof.
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Feb ’26
Reply to UITab memory leak
Hi Richard, Thanks for the quick response. I am on Xcode 26.2, and running iPadOS 26.2. Interestingly enough, it works fine on an iPhone simulator, but not the iPad.
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Feb ’26