Skip to content

Commit

Permalink
fix some memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
SamoZ256 committed Jan 23, 2025
1 parent a74c6ee commit 28bcaf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -130,6 +131,7 @@ MetalRenderer::MetalRenderer()
break;
}
}
devices->release();
}

if (!m_device)
Expand Down
1 change: 1 addition & 0 deletions src/Cafe/HW/Latte/Renderer/Metal/RendererShaderMtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ void RendererShaderMtl::CompileInternal()
{
// Compile from source
library = LibraryFromSource();
FinishCompilation();
if (!library)
return;

Expand Down

0 comments on commit 28bcaf0

Please sign in to comment.