mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 22:41:18 +12:00
fix some memory leaks
This commit is contained in:
parent
a74c6eef49
commit
28bcaf07d9
2 changed files with 3 additions and 0 deletions
|
@ -49,6 +49,7 @@ std::vector<MetalRenderer::DeviceInfo> MetalRenderer::GetDevices()
|
||||||
MTL::Device* device = static_cast<MTL::Device*>(devices->object(i));
|
MTL::Device* device = static_cast<MTL::Device*>(devices->object(i));
|
||||||
result.emplace_back(std::string(device->name()->utf8String()), device->registryID());
|
result.emplace_back(std::string(device->name()->utf8String()), device->registryID());
|
||||||
}
|
}
|
||||||
|
devices->release();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -130,6 +131,7 @@ MetalRenderer::MetalRenderer()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
devices->release();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_device)
|
if (!m_device)
|
||||||
|
|
|
@ -340,6 +340,7 @@ void RendererShaderMtl::CompileInternal()
|
||||||
{
|
{
|
||||||
// Compile from source
|
// Compile from source
|
||||||
library = LibraryFromSource();
|
library = LibraryFromSource();
|
||||||
|
FinishCompilation();
|
||||||
if (!library)
|
if (!library)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue