Skip to content

Memory leak when deleting from a locked dictionary thing implementation #242

@joente

Description

@joente

Describe the bug
When a lock is set on a dictionary implementation of a thing, a delete of a value raises an error (correctly) but also creates a memory leak.

To Reproduce
Code to reproduce the memory leak:

.set('non name key', nil);  // force a dictionary implementation
.arr = ['a', 'b'];
.arr.push({
  // push `c` but also delete the array.
  // the array is locked by the `push()` function and this correctly raises an error
  // but it also creates a memory leak as the value IS popped from the dict.
  .del('arr'); 'c'; 
});

Expected behavior
The error is correct, but it should not create a memory leak.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions