mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-09 10:55:34 +00:00
Fix incref
This commit is contained in:
parent
172875f057
commit
d9358ab13c
1 changed files with 0 additions and 10 deletions
|
|
@ -973,16 +973,6 @@ pub fn listSublist(
|
|||
}
|
||||
}
|
||||
|
||||
// When the list is not unique (refcount > 1), the seamless slice needs
|
||||
// its own reference to the parent allocation. The "consume" semantic
|
||||
// only means the caller gives us their reference, but there are other
|
||||
// holders, and the new slice is an additional reference to the allocation.
|
||||
if (!list.isUnique()) {
|
||||
if (list.getAllocationDataPtr()) |parent_alloc| {
|
||||
increfDataPtrC(parent_alloc, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return RocList{
|
||||
.bytes = source_ptr + start * element_width,
|
||||
.length = keep_len,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue