Make map_free_dynamic take the total size of the allocation

This commit is contained in:
gingerBill
2022-11-08 15:40:30 +00:00
parent 2f29894b45
commit dae299b781
3 changed files with 31 additions and 25 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ delete_slice :: proc(array: $T/[]$E, allocator := context.allocator, loc := #cal
}
@builtin
delete_map :: proc(m: $T/map[$K]$V, loc := #caller_location) -> Allocator_Error {
return map_free(transmute(Raw_Map)m, loc)
return map_free_dynamic(transmute(Raw_Map)m, map_info(T), loc)
}