fix closure RC increments

This commit is contained in:
Folkert 2021-05-18 21:34:37 +02:00
parent 8dddf952a8
commit 04968d6394
2 changed files with 3 additions and 6 deletions

View file

@ -195,10 +195,9 @@ pub fn listMap(
const output = RocList.allocate(std.heap.c_allocator, alignment, size, new_element_width);
const target_ptr = output.bytes orelse unreachable;
// if (call.data_is_owned) {
// }
call.inc_n_data(call.data, size);
if (call.data_is_owned) {
call.inc_n_data(call.data, size);
}
while (i < size) : (i += 1) {
call.caller(call.data, source_ptr + (i * old_element_width), target_ptr + (i * new_element_width));

View file

@ -963,8 +963,6 @@ fn strConcat(allocator: *Allocator, result_in_place: InPlace, arg1: RocStr, arg2
arg1.memcpy(result_ptr);
arg2.memcpy(result_ptr + arg1.len());
arg1.deinit(allocator);
return result;
}
}