mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Remove delete with wrong allocator
This commit is contained in:
@@ -1428,7 +1428,7 @@ split_multi :: proc(s: string, substrs: []string, allocator := context.allocator
|
|||||||
// sort substrings by string size, largest to smallest
|
// sort substrings by string size, largest to smallest
|
||||||
runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD()
|
runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD()
|
||||||
temp_substrs := slice.clone(substrs, context.temp_allocator)
|
temp_substrs := slice.clone(substrs, context.temp_allocator)
|
||||||
defer delete(temp_substrs)
|
|
||||||
slice.sort_by(temp_substrs, proc(a, b: string) -> bool {
|
slice.sort_by(temp_substrs, proc(a, b: string) -> bool {
|
||||||
return len(a) > len(b)
|
return len(a) > len(b)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user