Skip to content

[FIX]: clear view binding references in onDestroyView to prevent memory…#4814

Open
corevibe555 wants to merge 1 commit intoowncloud:masterfrom
corevibe555:technical/binding_resource_leaks
Open

[FIX]: clear view binding references in onDestroyView to prevent memory…#4814
corevibe555 wants to merge 1 commit intoowncloud:masterfrom
corevibe555:technical/binding_resource_leaks

Conversation

@corevibe555
Copy link
Copy Markdown

@corevibe555 corevibe555 commented Mar 31, 2026

Related Issues

Fixes #4813

Description

Set _binding = null in onDestroyView() for 10 fragments that were missing cleanup, preventing memory leaks when fragment instances outlive their views.

Affected fragments:

  • CreateShortcutDialogFragment
  • FileDetailsFragment
  • MainEmptyListFragment
  • RemoveFilesDialogFragment
  • SharesFragment
  • SpacesListFragment
  • CreateSpaceDialogFragment
  • AddMemberFragment
  • SpaceMembersFragment
  • SetSpaceIconDialogFragment

App:

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

QA

  • Verify app builds without errors
  • Navigate in and out of each affected fragment and confirm no crashes

@corevibe555 corevibe555 changed the title fix: clear view binding references in onDestroyView to prevent memory… [FIX]: clear view binding references in onDestroyView to prevent memory… Mar 31, 2026
@corevibe555
Copy link
Copy Markdown
Author

@joragua Here is another small PR.
Would you please review when you have a chance?

Thanks!

@joragua
Copy link
Copy Markdown
Collaborator

joragua commented Mar 31, 2026

Thanks for the contribution @corevibe555! 🙌🏻 I will check this PR as soon as possible and give you any feedback if necessary. Stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TECHNICAL] Resource leaks in fragment bindings

2 participants