开发者

Using threads to address memory leak in third party iphone libraries

开发者 https://www.devze.com 2023-01-15 11:02 出处:网络
I currently have implemented a third party library into my XCode project. The probl开发者_如何学Cem is that there are memory leaks which originate from the library which I found using Instruments.

I currently have implemented a third party library into my XCode project. The probl开发者_如何学Cem is that there are memory leaks which originate from the library which I found using Instruments.

My question is is it possible to kick off the API function which is leaking in a separate thread using the autorelease pool in order for that thread to clean up after itself? This way when I need to use it again, I start the function call in a different thread? In essence my thought is that it would be garbage collecting the leaky code so that it doesn't impact the main executable.


Memory leaks will be present either in the main thread or in any other thread. What's the difference between autoreleasing a leaking memory or releasing a leaking memory?

Same effect!

Fix the leaks.

Cheers

0

精彩评论

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