Skip to content

Instantly share code, notes, and snippets.

@christianb
Last active June 4, 2019 10:08
Show Gist options
  • Save christianb/093be1d980a55a8943a47b8d26850b31 to your computer and use it in GitHub Desktop.
Save christianb/093be1d980a55a8943a47b8d26850b31 to your computer and use it in GitHub Desktop.
Things to know about Android/Kotlin
// Looking at vals, delegated properties are not immutable. Remember, val does not imply anything with regards to mutability
// it merely says that the variable/property is read-only
private val aBeautifulNumber: Double
get() = Math.random()
- Using a lazily initialized property on a retained fragment causes a memory leak,
since the property holds a reference to the old view.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment