yichengchen / ATV-Bilibili-demo

BiliBili Client Demo for Apple TV (tvOS)
GNU General Public License v2.0
2.32k stars 436 forks source link

Memory leak in BMaskProvider #43

Closed qsz13 closed 1 year ago

qsz13 commented 1 year ago

Playing this video crashes after a few minutes due to memory leak: https://www.bilibili.com/video/BV1WG4y1C7mT/

Adding autoreleasepool around this while loop seems to mitigate the issue, but I'm not a tvOS developer, so not sure if this is the right fix. Memory usage is still growing, but slow enough to not crash.

https://github.com/yichengchen/ATV-Bilibili-demo/blob/c742445d5f650fe7e2c7bc7638a32a0dfb6cefbf/BilibiliLive/Component/Video/BMaskProvider.swift#L79

yichengchen commented 1 year ago

can you help fire a pull request for this ?