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.