[TECHNICAL] Resource leaks in fragment bindings#4814
[TECHNICAL] Resource leaks in fragment bindings#4814corevibe555 wants to merge 1 commit intoowncloud:masterfrom
Conversation
|
@joragua Here is another small PR. Thanks! |
|
Thanks for the contribution @corevibe555! 🙌🏻 I will check this PR as soon as possible and give you any feedback if necessary. Stay tuned! |
joragua
left a comment
There was a problem hiding this comment.
Nice job @corevibe555! 🍻 Some comments about this PR
-
I'd split this into two separate commits: one for the calens entry (
chore: add calens fileorchore: add changelog) and another one for the implementation (keeping the same name) -
Regarding changelog file: missing PR link at the end of the file. In addition, the name of the file must be the PR id (in this case:
4814) -
After rebasing the branch against
master, there are more fragments that need binding cleanup. Also, there is an extra point in this PR:onDestroy()methods that only handle binding cleanup should be replaced withonDestroyView(). There are three fragments currently clearing the binding inonDestroy():TransfersListFragment,SortBottomSheetFragment, andMainFileListFragment
| Bugfix: Resource leaks in fragment view bindings | ||
|
|
||
| View binding references have been cleared in onDestroyView() across 10 fragments to prevent memory leaks when fragment instances outlive their views. | ||
|
|
||
| https://github.com/owncloud/android/issues/4813 |
There was a problem hiding this comment.
I'd change the calens file like this:
| Bugfix: Resource leaks in fragment view bindings | |
| View binding references have been cleared in onDestroyView() across 10 fragments to prevent memory leaks when fragment instances outlive their views. | |
| https://github.com/owncloud/android/issues/4813 | |
| Enhancement: Resource leaks in fragment view bindings | |
| View binding references have been cleared in onDestroyView() across fragments to prevent memory leaks when fragment instances outlive their views. | |
| https://github.com/owncloud/android/issues/4813 |
Related Issues
Fixes #4813
Description
Set
_binding = nullinonDestroyView()for 10 fragments that were missing cleanup, preventing memory leaks when fragment instances outlive their views.Affected fragments:
CreateShortcutDialogFragmentFileDetailsFragmentMainEmptyListFragmentRemoveFilesDialogFragmentSharesFragmentSpacesListFragmentCreateSpaceDialogFragmentAddMemberFragmentSpaceMembersFragmentSetSpaceIconDialogFragmentApp:
ReleaseNotesViewModel.ktcreating a newReleaseNote()with String resources (if required)QA