How about checking for NULL?


#1

Look this code:
... CCSprite *pobSprite = new CCSprite(); if (pobSprite && pobSprite->initWithFile(pszFileName)) ...
After new operator never returns NULL, and is likely to be an exception bad_alloc, why check for Null?


#2

#3

So we had to catch the exception and not check for NULL.