Skip to content

Commit bcc0395

Browse files
authored
Merge pull request #767 from callstack-internal/perf/86765-allow-selectors-to-be-gced
perf: Change to WeakMap so selectors can be GC'ed
2 parents 38b512c + 1e92597 commit bcc0395

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/OnyxSnapshotCache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class OnyxSnapshotCache {
3333

3434
constructor() {
3535
this.snapshotCache = new Map();
36-
this.selectorIDMap = new Map();
36+
this.selectorIDMap = new WeakMap();
3737
this.selectorIDCounter = 0;
3838
this.cacheKeyRefCounts = new Map();
3939
}

0 commit comments

Comments
 (0)