Fix memory leak

This commit is contained in:
2019-05-24 10:01:28 +02:00
parent 7c5415df0d
commit f3a6783853
5 changed files with 18 additions and 16 deletions

View File

@@ -84,9 +84,7 @@ abstract class Komponent {
parent.replaceChild(newElement, oldElement)
elements[oldElement]?.also {
elements.remove(oldElement)
}
elements.remove(oldElement)
newKomponent.komponent?.also {
it.kompElement = newKomponent
@@ -183,10 +181,10 @@ abstract class Komponent {
it.kompElement = newElement
it.element = replacedElement
elements.remove(element)
elements[replacedElement] = it
}
elements.remove(element)
it.rendered = true
}
}