From 7580dc2dd03a1a97403c50606aa0cb16059463a9 Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Sat, 14 Jun 2025 08:36:17 -0400 Subject: [PATCH] mem: Remove pointless check in `Scratch_Allocator` The backup allocator is set at `init` which happens even if `Scratch` is nil at the head of `scratch_alloc_bytes_non_zeroed`. --- core/mem/allocators.odin | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin index 90a5c4943..98738c460 100644 --- a/core/mem/allocators.odin +++ b/core/mem/allocators.odin @@ -545,9 +545,6 @@ scratch_alloc_bytes_non_zeroed :: proc( if err != nil { return ptr, err } - if s.leaked_allocations == nil { - s.leaked_allocations, err = make([dynamic][]byte, a) - } append(&s.leaked_allocations, ptr) if logger := context.logger; logger.lowest_level <= .Warning { if logger.procedure != nil {