Leaks introduced when running against ARC code
I think it's because of Foundation being built with ARC enabled. This makes it so that some objects that weren't going through an autorelease pool now do, causing the NSThread to leak those objects.
malloc_history proof :
ALLOC 0x136429270-0x1364292ff [size=144]: thread_115b04000 |-[VDKQueue
watcherThread:] | -[NSObject(NSObject) autorelease] |
_CFAutoreleasePoolAddObject | CFLog | _CFLogvEx |
_CFStringCreateWithFormatAndArgumentsAux | CFStringCreateCopy |
__CFStringCreateImmutableFunnel3 | _CFRuntimeCreateInstance |
malloc_zone_malloc
----
FREE 0x136429270-0x1364292ff [size=144]: thread_115b04000 |-[VDKQueue
watcherThread:] | -[NSObject(NSObject) autorelease] |
_CFAutoreleasePoolAddObject | CFLog | _CFLogvEx | _CFRelease |
malloc_zone_free
Yea, you'll want to modify the code to make it Arc-compliant if you use it in that environment.
I'm not a fan of ARC, but I'll try to do this for the repo in the near future.
Sent from my iPhone
On Jul 31, 2013, at 8:00, Etienne Samson [email protected] wrote:
I think it's because of Foundation being built with ARC enabled. This makes it so that some objects that weren't going through an autorelease pool now do, causing the NSThread to leak those objects.
malloc_history proof :
ALLOC 0x136429270-0x1364292ff [size=144]: thread_115b04000 |-[VDKQueue watcherThread:] | -[NSObject(NSObject) autorelease] | _CFAutoreleasePoolAddObject | CFLog | _CFLogvEx | _CFStringCreateWithFormatAndArgumentsAux | CFStringCreateCopy | __CFStringCreateImmutableFunnel3 | _CFRuntimeCreateInstance |
malloc_zone_malloc
FREE 0x136429270-0x1364292ff [size=144]: thread_115b04000 |-[VDKQueue watcherThread:] | -[NSObject(NSObject) autorelease] | _CFAutoreleasePoolAddObject | CFLog | _CFLogvEx | _CFRelease | malloc_zone_free — Reply to this email directly or view it on GitHub.
look at https://github.com/bdkjones/VDKQueue/pull/11 …
@tiennou you can checkout from my repo and then recompile using ARC, that should fix the leaks…