Commit 47bad43
authored
fix: use WeakMap to avoid memory leak (#463)
IntersectionObserver roots were tracked in a Map. This ensures it's possible to reuse the Intersection Observer instance if they share the same options. Changed to use a WeakMap, so unused root elements can be garbage collected.
Closes #4621 parent b703489 commit 47bad43
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments