Commit 8393ee2
authored
fix: memory leak on Android (#1343)
## 📜 Description
Improving memory leak behavior on Android.
## 💡 Motivation and Context
As described in
#1334
- it doesn't fully solves memory leaks when activity restarts, but it
resolves some other issues that could cause memory leak further.
There is no breaking changes, so it's safe to have these changes 🤞
Partial fix without breaking changes for
#1334
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### Android
- cleanup `layoutListener`;
- track `attachedContent`;
- cleanup `attachedContent`;
- remove listener that has been attached to `attachedContent`;
## 🤔 How Has This Been Tested?
Tested on Pixel 7 PRO (API 36).
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed1 parent 83e34b7 commit 8393ee2
1 file changed
Lines changed: 5 additions & 1 deletion
File tree
- android/src/main/java/com/reactnativekeyboardcontroller/listeners
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
0 commit comments