weak ref to vertexdata

This commit is contained in:
yangxiao 2015-04-09 10:52:05 +08:00
parent a7a39d71f5
commit 9cefa3a9da
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->_indexBuffer = indexbuffer;
meshindex->_vertexData = vertexData; meshindex->_vertexData = vertexData;
indexbuffer->retain(); indexbuffer->retain();
vertexData->retain();
meshindex->_aabb = aabb; meshindex->_aabb = aabb;
meshindex->autorelease(); meshindex->autorelease();
@ -78,7 +77,6 @@ MeshIndexData::MeshIndexData()
MeshIndexData::~MeshIndexData() MeshIndexData::~MeshIndexData()
{ {
CC_SAFE_RELEASE(_indexBuffer); CC_SAFE_RELEASE(_indexBuffer);
CC_SAFE_RELEASE(_vertexData);
} }
MeshVertexData* MeshVertexData::create(const MeshData& meshdata) MeshVertexData* MeshVertexData::create(const MeshData& meshdata)

View File

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