Memory leak every time UIScrollView is released

后端 未结 4 897
误落风尘
误落风尘 2020-12-01 18:22

In my app I have a scroll view and four table views. Each time one is dragged and then released, I get a 48 byte leak. This really adds up. As you can see, both groups of le

4条回答
  •  孤城傲影
    2020-12-01 18:42

    A workaround:

    I realised that somehow this leaked bytes are stored within the scrollview. You have to release your scrollview and alloc it again from time to time, keeping its state. The way you detect when you should reload the scrollview is up to you, depends on your app needs. Every time you release the scrollview, these bytes are also released.

提交回复
热议问题