From ec7bf7a9d667bbbbdcda2b87e597e92fe3a7b767 Mon Sep 17 00:00:00 2001 From: minggo Date: Sun, 9 Jun 2013 15:03:38 +0800 Subject: [PATCH] issue #2271: fixed memory leak of CCTextureCache::snapshotTextures() --- cocos2dx/textures/CCTextureCache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos2dx/textures/CCTextureCache.cpp b/cocos2dx/textures/CCTextureCache.cpp index a70d6e47bc..43e7100926 100644 --- a/cocos2dx/textures/CCTextureCache.cpp +++ b/cocos2dx/textures/CCTextureCache.cpp @@ -232,6 +232,7 @@ CCDictionary* CCTextureCache::snapshotTextures() { pRet->setObject(pElement->getObject(), pElement->getStrKey()); } + pRet->autorelease(); return pRet; }