This commit is contained in:
Ming 2010-09-01 07:36:25 +00:00
parent ca8672ff62
commit ed023fc129
7 changed files with 61 additions and 60 deletions

View File

@ -604,7 +604,7 @@ void CCDirector::end(void)
stopAnimation();
#if CC_DIRECTOR_FAST_FPS
CCX_SAFE_RELEASE(m_pFPSLabel);
CCX_SAFE_RELEASE_NULL(m_pFPSLabel);
#endif
// purge bitmap cache

View File

@ -51,7 +51,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -137,7 +137,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -203,7 +203,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -254,7 +254,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -305,7 +305,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -377,7 +377,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -432,7 +432,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -487,7 +487,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -547,7 +547,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -602,7 +602,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -657,7 +657,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -707,7 +707,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -725,7 +725,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -793,7 +793,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -811,7 +811,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -878,7 +878,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -896,7 +896,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -962,7 +962,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -980,7 +980,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -1062,7 +1062,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -1128,7 +1128,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -1184,7 +1184,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -1240,7 +1240,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -1301,7 +1301,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -1357,7 +1357,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}
@ -1415,7 +1415,7 @@ namespace cocos2d {
}
else
{
CCX_SAFE_RELEASE(pRet);
CCX_SAFE_RELEASE_NULL(pRet);
}
}

View File

@ -40,7 +40,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -114,7 +114,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -240,7 +240,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -349,7 +349,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -451,7 +451,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -536,7 +536,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -614,7 +614,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -688,7 +688,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -773,7 +773,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}

View File

@ -37,7 +37,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}

View File

@ -50,7 +50,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -143,7 +143,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -241,7 +241,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -407,7 +407,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -495,7 +495,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -527,7 +527,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -571,7 +571,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -616,7 +616,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -749,7 +749,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -827,7 +827,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -916,7 +916,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}
@ -995,7 +995,7 @@ namespace cocos2d
}
else
{
CCX_SAFE_RELEASE(pAction);
CCX_SAFE_RELEASE_NULL(pAction);
}
}

View File

@ -120,16 +120,17 @@ namespace cocos2d
if (m_pSprite != pSprite)
{
CCX_SAFE_RELEASE(m_pSprite);
}
m_pSprite = pSprite;
pSprite->retain();
// Everytime we set a new sprite, we free the current vertex data
if (m_pVertexData)
{
delete[] m_pVertexData;
m_pVertexData = NULL;
m_nVertexDataCount = 0;
m_pSprite = pSprite;
pSprite->retain();
// Everytime we set a new sprite, we free the current vertex data
if (m_pVertexData)
{
delete[] m_pVertexData;
m_pVertexData = NULL;
m_nVertexDataCount = 0;
}
}
}

View File

@ -49,7 +49,7 @@ CCSpriteFrameCache* CCSpriteFrameCache::sharedSpriteFrameCache(void)
void CCSpriteFrameCache::purgeSharedSpriteFrameCache(void)
{
CCX_SAFE_RELEASE(pSharedSpriteFrameCache);
CCX_SAFE_RELEASE_NULL(pSharedSpriteFrameCache);
}
CCSpriteFrameCache* CCSpriteFrameCache::init(void)