Merge pull request #11352 from super626/v3

Fix Sprite3D memory leak
This commit is contained in:
minggo 2015-04-09 13:57:03 +08:00
commit 9891a94e87
2 changed files with 1 additions and 3 deletions

View File

@ -56,7 +56,6 @@ MeshIndexData* MeshIndexData::create(const std::string& id, MeshVertexData* vert
meshindex->_indexBuffer = indexbuffer;
meshindex->_vertexData = vertexData;
indexbuffer->retain();
vertexData->retain();
meshindex->_aabb = aabb;
meshindex->autorelease();
@ -78,7 +77,6 @@ MeshIndexData::MeshIndexData()
MeshIndexData::~MeshIndexData()
{
CC_SAFE_RELEASE(_indexBuffer);
CC_SAFE_RELEASE(_vertexData);
}
MeshVertexData* MeshVertexData::create(const MeshData& meshdata)

View File

@ -86,7 +86,7 @@ CC_CONSTRUCTOR_ACCESS:
protected:
IndexBuffer* _indexBuffer; //index buffer
MeshVertexData* _vertexData; //vertex buffer
MeshVertexData* _vertexData; //vertex buffer, weak ref
AABB _aabb; // original aabb of the submesh
std::string _id; //id
GLenum _primitiveType;