Slide 12
Slide 12 text
3. Listener and View members in Fragments nullify
@mvndy_hd #programmingandroidwithkotlin
● Be wary of third-party libraries that may reference the use of an
Android resource
● The Fragment's View (but not the Fragment itself) is destroyed
when a Fragment is put on the backstack²
○ Developers are expected to clear refs for views in Fragment::onDestroyView
¹ “Issue 145468285: Memory Leak with Nested Fragments and Data Binding.” Issuetracker.google.com, Google, 2 Dec. 2019, 09:01am PT, issuetracker.google.com/issues/145468285#comment6.