From 4f7d3ddedf23ac7f611bcf1a6292788267850692 Mon Sep 17 00:00:00 2001 From: dweiller <4678790+dweiller@users.noreplay.github.com> Date: Thu, 21 Jul 2022 14:12:38 +1000 Subject: [PATCH] examples/gkurve: fix memory leak --- examples/gkurve/main.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/gkurve/main.zig b/examples/gkurve/main.zig index 2bcac61a..9a54e9b8 100644 --- a/examples/gkurve/main.zig +++ b/examples/gkurve/main.zig @@ -83,6 +83,7 @@ pub fn init(app: *App, core: *mach.Core) !void { atlas_white_region.height -= 2; const white_texture_uv_data = atlas_white_region.getUVData(atlas_float_size); var white_tex_data = try core.allocator.alloc(zigimg.color.Rgba32, white_tex_scale * white_tex_scale); + defer core.allocator.free(white_tex_data); std.mem.set(zigimg.color.Rgba32, white_tex_data, zigimg.color.Rgba32.initRGB(0xff, 0xff, 0xff)); app.texture_atlas_data.set(atlas_white_region, white_tex_data);