mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-02 03:02:37 +00:00
- Set the allocator, even if memory allocation fails. Right now it doesn't, which means that if allocation fails, it'll use the context allocator instead. This memory will be leaked if the user doesn't understand that this happened. - Only set len and cap of the array returned from make iif the memory allocation succeeded. This means that reserve will return false if you do this: ``` a := make([dynamic]int, failing_allocator); if !reserve(&a, 5) do return; // or whatever indicates failure ```