diff --git a/core/encoding/json/types.odin b/core/encoding/json/types.odin index 468774aa9..57daaafef 100644 --- a/core/encoding/json/types.odin +++ b/core/encoding/json/types.odin @@ -87,7 +87,8 @@ Error :: enum { -destroy_value :: proc(value: Value) { +destroy_value :: proc(value: Value, allocator := context.allocator) { + context.allocator := allocator #partial switch v in value { case Object: for key, elem in v { @@ -103,5 +104,4 @@ destroy_value :: proc(value: Value) { case String: delete(v) } -} - +} \ No newline at end of file