Commit 5229e50
Fix memory leak in TextInput (#55719)
Summary:
When implementing a local FPS monitor I noticed that `TextInput` leaked memory. tomekzaw helped triage and confirm whether the leak was occurring in reanimated or react-native upstream.
We collaborated on a fix for this and noticed that this was fixed 6 years ago in text [here](490e33d)
We've ported the same fix to `BaseTextInputShadowNode.h`
## Changelog:
[General] [Fixed] - Fix memory leak in TextInput
Pull Request resolved: #55719
Test Plan:
https://snack.expo.dev/mobinni/memory-leak-reproducer
- Run this with XCode instruments and see memory grow over time
<img width="1094" height="930" alt="image" src="https://github.com/user-attachments/assets/bc9abb5a-42ff-430c-8efb-a418ba65ddc2" />
Reviewed By: NickGerleman, mdvacca
Differential Revision: D94267721
Pulled By: javache
fbshipit-source-id: 69a5b5254c2d498796c209cb133a5929d11c36ef1 parent 677330a commit 5229e50
1 file changed
Lines changed: 13 additions & 1 deletion
File tree
- packages/react-native/ReactCommon/react/renderer/components/textinput
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
174 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
175 | 187 | | |
176 | 188 | | |
177 | 189 | | |
| |||
0 commit comments