Looks like there’s a problem with an Obj-C objects created within loading thread - autorelease pool is created in thread but it’s never drained. TextureCacheTest causes constant heap growth and eventually leads to a crash being repeated enough times.
Something like that seems to work:
1. Append drain method to CCThread definition.
- Call it every time asyncronous resource loading is finished:
static void* loadImage(void* data)
I’m not sure if it’s a Right Way to handle an autorelease pool, I’m quite incompetent in Obj-C.