Fix ViewBinding memory leak in MediaDetailFragment - #6849
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the reported ViewBinding leak in MediaDetailFragment by clearing the fragment’s view binding reference when the view is destroyed (Fragment view lifecycle best practice).
Changes:
- Set
_binding = nullinonDestroyView()to release references to the fragment’s view hierarchy.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
✅ Generated APK variants! |
|
@nicolas-raoul @RitikaPahwa4444 can you please review this pr |
|
Confirmed the core fix is correct — |
Description (required)
Fixes #6827
Set _binding = null in onDestroyView() to release the view hierarchy reference when the fragment view is destroyed
Tests performed (required)
Tested 6.4.0-debug on Pixel 9 (Android 16)