Commit b262860
committed
Clean POSModalManager resources when POS is closed
POSModalManager creates memory leaks by holding closures that deeper in the stack hold POSModalManager, creating reference cycles.
We need to manually break them. We already cal reset() when view disappears. However, it's not called when POS is closed.
Not cleaning POSModalManager results in all POS resources, incuding aggregate models and services duplicated.1 parent 6a412b9 commit b262860
File tree
2 files changed
+5
-0
lines changed- WooCommerce/Classes/POS/Presentation
- Reusable Views
2 files changed
+5
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
0 commit comments