change dynamic array reset to align with memory management conventions

This commit is contained in:
Judah Caruso 2025-05-27 00:51:39 -06:00
parent 71964e8aea
commit 72a24efd32

View file

@ -21,11 +21,8 @@ resize :: inline (arr: *[..]$T, new_size: int) {
basic.array_reserve(arr, new_size,, allocator = arr.allocator);
}
reset :: inline (arr: *[..]$T, $keep_memory := true) {
reset :: inline (arr: *[..]$T) {
arr.count = 0;
#if !keep_memory {
mem.release_memory(arr.data,, allocator = arr.allocator);
}
}