Skip to content

Commit

Permalink
Make sure we clear all the views onDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
planarvoid committed Jul 18, 2022
1 parent b805732 commit 48b219d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ class PlaceholderManager(
}

fun onDestroy() {
positionToId.forEach {
container.findViewWithTag<View>(it.uuid)?.let { placeholder ->
container.removeView(placeholder)
}
}
positionToId.clear()
aztecText.contentChangeWatcher.unregisterObserver(this)
adapters.values.forEach { it.onDestroy() }
adapters.clear()
Expand Down

0 comments on commit 48b219d

Please sign in to comment.