Skip to content

Commit

Permalink
fix missing disposal of nested transition nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Sep 3, 2024
1 parent 30725b2 commit e4b2c66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/weak-fishes-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solid-js": patch
---

fix missing disposal of nested transition nodes
10 changes: 5 additions & 5 deletions packages/solid/src/reactive/signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1654,12 +1654,12 @@ function cleanNode(node: Owner) {
}
}

if ((node as Memo<any>).tOwned) {
for (i = (node as Memo<any>).tOwned!.length - 1; i >= 0; i--)
cleanNode((node as Memo<any>).tOwned![i]);
delete (node as Memo<any>).tOwned;
}
if (Transition && Transition.running && (node as Memo<any>).pure) {
if ((node as Memo<any>).tOwned) {
for (i = (node as Memo<any>).tOwned!.length - 1; i >= 0; i--)
cleanNode((node as Memo<any>).tOwned![i]);
delete (node as Memo<any>).tOwned;
}
reset(node as Computation<any>, true);
} else if (node.owned) {
for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
Expand Down

0 comments on commit e4b2c66

Please sign in to comment.