Skip to content

Instantly share code, notes, and snippets.

@ahinchman1
Created October 26, 2022 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahinchman1/d8822dbca065e2d0b3bc57e5ec381b93 to your computer and use it in GitHub Desktop.
Save ahinchman1/d8822dbca065e2d0b3bc57e5ec381b93 to your computer and use it in GitHub Desktop.
Nullify view references in Fragment
class SomeFragment : Fragment() {
private var imageView: ImageView? = null
/* removed for brevity */
override fun onDestroyView() {
super.onDestroyView()
imageView = null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment