Skip to content

Commit

Permalink
fix: memory leak in DataStore
Browse files Browse the repository at this point in the history
We have a set of promises waiting to be indexed, and we never removed
these promises from the set. This fixes that memory leak.
  • Loading branch information
EvanHahn committed Oct 30, 2024
1 parent 5aa2618 commit 01663bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/datastore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export class DataStore extends TypedEmitter {
const pending = this.#pendingIndex.get(versionId)
if (!pending) continue
pending.resolve()
this.#pendingIndex.delete(versionId)
}
for (const schemaName of this.schemas) {
// Unsupported initially
Expand Down

0 comments on commit 01663bb

Please sign in to comment.