From 886e6b50c91bbdb2e950593fb438f59064cb635e Mon Sep 17 00:00:00 2001 From: Greg Wells Date: Thu, 29 May 2025 13:08:13 -0400 Subject: [PATCH] free object on destruction --- rendering_api/metal/src/core/devices/metal_output_device.m | 1 + .../metal/src/core/shader_module/metal_shader_module.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rendering_api/metal/src/core/devices/metal_output_device.m b/rendering_api/metal/src/core/devices/metal_output_device.m index da63168..51aa72a 100644 --- a/rendering_api/metal/src/core/devices/metal_output_device.m +++ b/rendering_api/metal/src/core/devices/metal_output_device.m @@ -95,6 +95,7 @@ void gnDestroyOutputDeviceFn(gnOutputDevice* device) { [device->outputDevice->queues[i] release]; } [device->outputDevice->device release]; + free(device->outputDevice); } // struct mtlFramebufferVertex { diff --git a/rendering_api/metal/src/core/shader_module/metal_shader_module.m b/rendering_api/metal/src/core/shader_module/metal_shader_module.m index a58e7da..42e6fc9 100644 --- a/rendering_api/metal/src/core/shader_module/metal_shader_module.m +++ b/rendering_api/metal/src/core/shader_module/metal_shader_module.m @@ -83,5 +83,5 @@ gnReturnCode gnCreateShaderModuleFn(struct gnShaderModule_t *module, struct gnOu } void gnDestroyShaderModuleFn(struct gnShaderModule_t* module) { - + free(module->shaderModule); }