@wct511 写道:
我有两个模型 模型create的时候 下面这函数的CC_SAFE_RETAIN执行了7次 析构的时候只release执行了三次。
导致TextureCache中的texture无法释放。 rc每次都增加void Mesh::setTexture(Texture2D* tex, NTextureData::Usage usage, bool cacheFileName)
{
// Texture must be saved for future use
// it doesn't matter if the material is already set or not
// This functionality is added for compatibility issues
if (tex == nullptr)
tex = getDummyTexture();CC_SAFE_RETAIN(tex); CC_SAFE_RELEASE(_textures[usage]);
帖子: 3
参与者: 1