mirror of https://github.com/axmolengine/axmol.git
fix memory leak (#20423)
This commit is contained in:
parent
a0e24c4c42
commit
69b1f6f8fd
|
@ -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