I have a UITextView that seems to be slowing down my App when I scroll through all of the view. I took a looking inside instruments and found out _UITextContainerView is taking up a lot of memory. I am guess it isn't being released. Any tips on how to fix this will be appreciated. I am just using the standard UITextView and UIScrollView.
Memory use won't cause an app to slow down unless there is a lot of allocation/deallocation going on. In this case, it simply sounds like you are loading a really large document and scrolling through it; a worst case scenario for something like UITextView, especially if it is complicated layout.
It also sounds like that the UITextView hanging on to a bunch of memory might be normal behavior in this case. Does the memory go away when you leave the screen with the UITextView? If not, then there is potentially a leak.
If memory does reduce, then this is normal behavior. To restore responsiveness, you'll need to break up the document into smaller chunks or otherwise optimize the format to something that UITextView lays out faster while using fewer resources.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With