diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2022-03-06 09:43:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-06 09:43:12 +0000 |
| commit | ad719e7c3a258c84079581c7a9be71e0434c98cd (patch) | |
| tree | e5250c61995f926720d91de7acdd76cd6a3b5306 /core/container/bit_array/bit_array.odin | |
| parent | 4315033220abf83c058216bb0ae4d30bda0a5308 (diff) | |
| parent | bff3426d254bf728b330c6f93fac97339cc41c67 (diff) | |
Merge pull request #1588 from ap29600/master
Fix leak in `core:container/bit_array`
Diffstat (limited to 'core/container/bit_array/bit_array.odin')
| -rw-r--r-- | core/container/bit_array/bit_array.odin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/container/bit_array/bit_array.odin b/core/container/bit_array/bit_array.odin index 5eebe1bcb..0016ca105 100644 --- a/core/container/bit_array/bit_array.odin +++ b/core/container/bit_array/bit_array.odin @@ -1,6 +1,7 @@ package dynamic_bit_array import "core:intrinsics" +import "core:mem" /* Note that these constants are dependent on the backing being a u64. @@ -206,7 +207,7 @@ create :: proc(max_index: int, min_index := 0, allocator := context.allocator) - */ clear :: proc(ba: ^Bit_Array) { if ba == nil { return } - ba.bits = {} + mem.zero_slice(ba.bits[:]) } /* |