mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
make sure to check raw capacity when decrementing refcounts
This commit is contained in:
parent
5d87ba3441
commit
b94a046b0d
3 changed files with 15 additions and 14 deletions
|
@ -112,7 +112,8 @@ pub const RocList = extern struct {
|
|||
}
|
||||
|
||||
pub fn decref(self: RocList, alignment: u32) void {
|
||||
utils.decref(self.getRefcountPtr(), self.getCapacity(), alignment);
|
||||
// We use the raw capacity to ensure we always decrement the refcount of seamless slices.
|
||||
utils.decref(self.getRefcountPtr(), self.capacity_or_ref_ptr, alignment);
|
||||
}
|
||||
|
||||
pub fn elements(self: RocList, comptime T: type) ?[*]T {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue