fix memory leak (#20423)

This commit is contained in:
coulsonwang 2020-01-06 09:34:53 +08:00 committed by halx99
parent cdc0d4702c
commit 025244b7dd
1 changed files with 1 additions and 0 deletions

View File

@ -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