mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Fix RocList memory leak
Also, reduces the number of elements in the quicksort example to make it run better with valgrind.
This commit is contained in:
parent
a092a7642a
commit
97c23557c7
2 changed files with 3 additions and 3 deletions
|
@ -71,7 +71,7 @@ impl<T> RocList<T> {
|
|||
let value = *self.get_storage_ptr();
|
||||
|
||||
// NOTE doesn't work with elements of 16 or more bytes
|
||||
match usize::cmp(&0, &value) {
|
||||
match isize::cmp(&(value as isize), &0) {
|
||||
Equal => Some(Storage::ReadOnly),
|
||||
Less => Some(Storage::Refcounted(value)),
|
||||
Greater => Some(Storage::Capacity(value)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue