HarperFast / HarperFast/rql

or() doesn't clean up __rqlId attributes

Open
#65 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
276
Forks
48
PR merge metrics
No merged PRs in 30d

Description

In js-array.js, the or() function attempts to clean up its temporary '__rqlId' attributes using:

```
// cleanup markers
for(var i = 0, l = items.length; i < l; i++){
delete items[idProperty];
}
```

This should be:

```
// cleanup markers
for(var i = 0, l = items.length; i < l; i++){
delete items[i][idProperty];
}
```

With enough objects and frequent enough queries, this can lead to a substantial memory leak.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.