iOScoder
iOScoder

Reputation: 191

Using threads to address memory leak in third party iphone libraries

I currently have implemented a third party library into my XCode project. The problem 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.

Upvotes: 3

Views: 186

Answers (1)

Cezar Alexandru Vancea
Cezar Alexandru Vancea

Reputation: 578

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

Upvotes: 1

Related Questions