Skip to content

Commit

Permalink
fix memory leak (#20423)
Browse files Browse the repository at this point in the history
  • Loading branch information
coulsonwang authored and minggo committed Jan 6, 2020
1 parent bc800ef commit cfad5de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cocos/3d/CCMeshVertexIndexData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ MeshVertexData* MeshVertexData::create(const MeshData& meshdata)
{
auto& index = meshdata.subMeshIndices[i];
auto indexBuffer = backend::Device::getInstance()->newBuffer(index.size() * sizeof(index[0]), backend::BufferType::INDEX, backend::BufferUsage::STATIC);
indexBuffer->autorelease();
#if CC_ENABLE_CACHE_TEXTURE_DATA
indexBuffer->usingDefaultStoredData(false);
#endif
Expand Down

0 comments on commit cfad5de

Please sign in to comment.