views:

38

answers:

1

Hello,

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.

Appreciate your help.

Winston

+1  A: 

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

lupu1001
Thanks for the response. The issue is that I cannot fix their leaks since it is their proprietary code, so I am trying to if there is anyway that I can "contain" their memory leak. For instance, if I recall in Unix, if I fork a process using a system fork, I believe that it can finish (or die) without affecting the parent process.
Winston
So I was wondering if it is possible to do something similar within IOS 4.0. Thanks for your thoughts!
Winston