Skip to content

Instantly share code, notes, and snippets.

@BuiVanNam
Created December 2, 2020 15:23
Show Gist options
  • Save BuiVanNam/9b1214abf7cadb8476ba0e52166b64b0 to your computer and use it in GitHub Desktop.
Save BuiVanNam/9b1214abf7cadb8476ba0e52166b64b0 to your computer and use it in GitHub Desktop.
class ClassA {
var objectA = null
init {
objectA = getAFromFrameworkApi()
}
fun registerListenerAChange() {
objectA.registerStateChange()
}
fun unRegisterListenerAChange() {
objectA.unregister()
}
fun releaseAll() {
objectA.release()
objectA = null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment