Open tomisalready opened 8 years ago
`Texture2D::~Texture2D() {
VolatileTextureMgr::removeTexture(this);
CCLOGINFO("deallocing Texture2D: %p - id=%u", this, _name); CC_SAFE_RELEASE(_shaderProgram); if(_name) { GL::deleteTexture(_name); } if(_hasAlpha){ Director::getInstance()->getTextureCache()->getTextureForKey(_alphaTexture)->release(); }
}`
_alphaTexture 这样直接release后, textureCache里面是否需要再 _textures.erase()对应的key呢?
`Texture2D::~Texture2D() {
if CC_ENABLE_CACHE_TEXTURE_DATA
endif
}`
_alphaTexture 这样直接release后, textureCache里面是否需要再 _textures.erase()对应的key呢?