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:
Victor K 2013-01-14 15:32:30 +07:00
parent b640b6c206
commit bf01df0f52
1 changed files with 4 additions and 4 deletions

View File

@ -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 )