fix the bug that app crash

Object is realsed in the different thread which cocos-2d is not thread safety.