diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-10 19:30:32 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-10 19:30:32 +0100 |
| commit | a36a8722dc823c6fe143f7935e79467c6569bc00 (patch) | |
| tree | 6dc0f7c0000150a7d4708b4384e785d4dd93cfea /src/check_stmt.cpp | |
| parent | 21b1173076cec12f97c5779556509ef1b908c644 (diff) | |
Minimize more thread contention
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index e03d4a7ae..ba9c08fed 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -2567,8 +2567,9 @@ gb_internal void check_return_stmt(CheckerContext *ctx, Ast *node) { result_count = proc_type->Proc.results->Tuple.variables.count; } - auto operands = array_make<Operand>(heap_allocator(), 0, 2*rs->results.count); - defer (array_free(&operands)); + TEMPORARY_ALLOCATOR_GUARD(); + + auto operands = array_make<Operand>(temporary_allocator(), 0, 2*rs->results.count); check_unpack_arguments(ctx, result_entities, result_count, &operands, rs->results, UnpackFlag_AllowOk); |