fix some memory leaks

This commit is contained in:
Samuliak 2025-01-23 19:54:17 +01:00
parent a74c6eef49
commit 28bcaf07d9
No known key found for this signature in database
2 changed files with 3 additions and 0 deletions

View file

@ -49,6 +49,7 @@ std::vector<MetalRenderer::DeviceInfo> MetalRenderer::GetDevices()
MTL::Device* device = static_cast<MTL::Device*>(devices->object(i));
result.emplace_back(std::string(device->name()->utf8String()), device->registryID());
}
devices->release();
return result;
}
@ -130,6 +131,7 @@ MetalRenderer::MetalRenderer()
break;
}
}
devices->release();
}
if (!m_device)

View file

@ -340,6 +340,7 @@ void RendererShaderMtl::CompileInternal()
{
// Compile from source
library = LibraryFromSource();
FinishCompilation();
if (!library)
return;