change dynamic array reset to align with memory management conventions
This commit is contained in:
parent
71964e8aea
commit
72a24efd32
1 changed files with 1 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue