fix decref tuple values

This commit is contained in:
Luke Boswell 2025-11-29 08:38:26 +11:00
parent 17d23bd42a
commit e2d1d9e2cd
No known key found for this signature in database
GPG key ID: 54A7324B1B975757

View file

@ -458,6 +458,9 @@ pub const Interpreter = struct {
temp_binds.items.len = 0;
}
// Decref args after body evaluation (caller transfers ownership)
defer if (params.len > 0) args_tuple_value.decref(&self.runtime_layout_store, roc_ops);
defer self.trimBindingList(&self.bindings, base_binding_len, roc_ops);
// Evaluate body, handling early returns at function boundary