Using threads to address memory leak in third party iphone libraries
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
精彩评论