aboutsummaryrefslogtreecommitdiff
path: root/core/prof
diff options
context:
space:
mode:
authorchris-montero <theredingredient@gmail.com>2024-12-21 15:53:55 +0200
committerchris-montero <theredingredient@gmail.com>2024-12-21 15:53:55 +0200
commitc06f79bb360bc27353f5139a6c763828b3a16ba2 (patch)
treed29bedcef3d87fb8fbe3e16fe0f4e9b595500df8 /core/prof
parent597fba7c31f5e927b0c7431444dad132352b4046 (diff)
fixed memory leak in core/prof/spall/doc.odin example code
Diffstat (limited to 'core/prof')
-rw-r--r--core/prof/spall/doc.odin2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/prof/spall/doc.odin b/core/prof/spall/doc.odin
index c81bad05f..b007ad4cb 100644
--- a/core/prof/spall/doc.odin
+++ b/core/prof/spall/doc.odin
@@ -18,6 +18,8 @@ Example:
defer spall.context_destroy(&spall_ctx)
buffer_backing := make([]u8, spall.BUFFER_DEFAULT_SIZE)
+ defer delete(buffer_backing)
+
spall_buffer = spall.buffer_create(buffer_backing, u32(sync.current_thread_id()))
defer spall.buffer_destroy(&spall_ctx, &spall_buffer)