Skip to content

Instantly share code, notes, and snippets.

@satoshun
Created January 17, 2020 00:16
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 satoshun/b05f80511ac1183725497e6e4a91ee60 to your computer and use it in GitHub Desktop.
Save satoshun/b05f80511ac1183725497e6e4a91ee60 to your computer and use it in GitHub Desktop.
class MainFragment : Fragment(R.layout.main_frag) {
// private lateinit var binding: MainFragBinding <-- memory leak?
private val binding: MainFragBinding get() = MainFragBinding.bind(view!!)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment