Skip to content

Commit 19c88b2

Browse files
authored
Merge pull request Expensify#68834 from software-mansion-labs/fix/animated-memory-leak
Fix memory leak with Animated API
2 parents 2caa11e + e81d352 commit 19c88b2

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

patches/react-native-web/details.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,14 @@
119119
- Upstream PR/issue: The patch isn't something we can apply to upstream because we are specifically allowing custom props used by Fullstory to be forwarded to their respective DOM elements.
120120
- E/App issue: As explained above the current solution can't be applied to upstream because it's tailored to Fullstory needs.
121121
- PR introducing patch: https://github.com/Expensify/App/pull/67552
122+
123+
### [react-native-web+0.20.0+011+fix-memory-leak.patch](react-native-web+0.20.0+011+fix-memory-leak.patch)
124+
- Reason:
125+
126+
```
127+
Fixes memory leak on web caused by Animated API used in @react-navigation package
128+
```
129+
130+
- Upstream PR/issue: https://github.com/necolas/react-native-web/pull/2800
131+
- E/App issue: https://github.com/Expensify/App/issues/65820
132+
- PR introducing patch: https://github.com/Expensify/App/pull/68834
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedProps.js b/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedProps.js
2+
index 9ba3336..2d67005 100644
3+
--- a/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedProps.js
4+
+++ b/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedProps.js
5+
@@ -68,6 +68,7 @@ class AnimatedProps extends AnimatedNode {
6+
if (this.__isNative && this._animatedView) {
7+
this.__disconnectAnimatedView();
8+
}
9+
+ this._animatedView = null
10+
for (var key in this._props) {
11+
var value = this._props[key];
12+
if (value instanceof AnimatedNode) {

0 commit comments

Comments
 (0)