base64 create sprite in cocos2d-x for android

view story

http://stackoverflow.com – I have a image base64 encode string, and use the next method to create 'CCTexture2D'. It work well on ios, but there is some problem on android. When I next enter the game, the sprite cannot load well. why? CCTexture2D* sat::getTextureBySource(string source) { string url = base64_decode(source); const char* c = url.c_str(); CCImage *img = new CCImage(); img->initWithImageData((void*)c, url.size()); CCTexture2D *tex = new CCTexture2D(); tex->initWithImage(img); img->release(); return tex; } (HowTos)