mirror of https://github.com/axmolengine/axmol.git
fix memory leak (#20423)
This commit is contained in:
parent
cdc0d4702c
commit
025244b7dd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue