mirror of https://github.com/axmolengine/axmol.git
Fix addImageAsync iOS memory leak
Bug: http://www.cocos2d-x.org/issues/1087 Thread: http://www.cocos2d-x.org/boards/6/topics/17031
This commit is contained in:
parent
b640b6c206
commit
bf01df0f52
|
@ -111,14 +111,14 @@ static CCImage::EImageFormat computeImageFormatType(string& filename)
|
|||
|
||||
static void* loadImage(void* data)
|
||||
{
|
||||
// create autorelease pool for iOS
|
||||
CCThread thread;
|
||||
thread.createAutoreleasePool();
|
||||
|
||||
AsyncStruct *pAsyncStruct = NULL;
|
||||
|
||||
while (true)
|
||||
{
|
||||
// create autorelease pool for iOS
|
||||
CCThread thread;
|
||||
thread.createAutoreleasePool();
|
||||
|
||||
// wait for rendering thread to ask for loading if s_pAsyncStructQueue is empty
|
||||
int semWaitRet = sem_wait(s_pSem);
|
||||
if( semWaitRet < 0 )
|
||||
|
|
Loading…
Reference in New Issue