fixed memory leak introduced by 48796a0fa3

This commit is contained in:
Lorenzo Torres 2025-03-17 19:46:22 +01:00
parent 3a210a6959
commit 0ea03c54bc

View file

@ -106,6 +106,7 @@ pub const Instance = struct {
_ = c.vkEnumerateInstanceLayerProperties(&avaliableLayersCount, availableLayers.items.ptr); _ = c.vkEnumerateInstanceLayerProperties(&avaliableLayersCount, availableLayers.items.ptr);
// Every layer we do have we add to this list, if we don't have it no worries just print a message and continue // Every layer we do have we add to this list, if we don't have it no worries just print a message and continue
var newLayers = std.ArrayList([*c]const u8).init(allocator); var newLayers = std.ArrayList([*c]const u8).init(allocator);
defer newLayers.deinit();
// Loop over layers we want // Loop over layers we want
for (validation_layers) |want_layer| { for (validation_layers) |want_layer| {
var found = false; var found = false;