Fix memory leak
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
group 'nl.astraeus'
|
group 'nl.astraeus'
|
||||||
version '0.1.2-SNAPSHOT'
|
version '0.1.3-SNAPSHOT'
|
||||||
|
|
||||||
apply plugin: 'kotlin2js'
|
apply plugin: 'kotlin2js'
|
||||||
apply plugin: 'kotlin-dce-js'
|
apply plugin: 'kotlin-dce-js'
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
|
||||||
|
|||||||
17
komp.iml
17
komp.iml
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module external.linked.project.id="komp" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="nl.astraeus" external.system.module.version="0.1.0-SNAPSHOT" type="JAVA_MODULE" version="4">
|
<module external.linked.project.id="komp" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="nl.astraeus" external.system.module.version="0.1.2" type="JAVA_MODULE" version="4">
|
||||||
<component name="FacetManager">
|
<component name="FacetManager">
|
||||||
<facet type="kotlin-language" name="Kotlin">
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
<configuration version="3" platform="JavaScript " useProjectSettings="false">
|
<configuration version="3" platform="JavaScript " useProjectSettings="false">
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
<compilerArguments>
|
<compilerArguments>
|
||||||
<option name="outputFile" value="$MODULE_DIR$/build/classes/kotlin/main/komp.js" />
|
<option name="outputFile" value="$MODULE_DIR$/build/classes/kotlin/main/komp.js" />
|
||||||
<option name="noStdlib" value="true" />
|
<option name="noStdlib" value="true" />
|
||||||
<option name="sourceMapEmbedSources" value="inlining" />
|
<option name="sourceMap" value="true" />
|
||||||
|
<option name="sourceMapEmbedSources" value="always" />
|
||||||
<option name="metaInfo" value="true" />
|
<option name="metaInfo" value="true" />
|
||||||
<option name="target" value="v5" />
|
<option name="target" value="v5" />
|
||||||
<option name="main" value="call" />
|
<option name="main" value="call" />
|
||||||
@@ -20,6 +21,10 @@
|
|||||||
<option name="pluginClasspaths">
|
<option name="pluginClasspaths">
|
||||||
<array />
|
<array />
|
||||||
</option>
|
</option>
|
||||||
|
<option name="coroutinesState" value="warn" />
|
||||||
|
<option name="errors">
|
||||||
|
<ArgumentParseErrors />
|
||||||
|
</option>
|
||||||
</compilerArguments>
|
</compilerArguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
@@ -29,14 +34,14 @@
|
|||||||
<output-test url="file://$MODULE_DIR$/out/test/classes" />
|
<output-test url="file://$MODULE_DIR$/out/test/classes" />
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" type="kotlin-source" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" type="kotlin-test" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="kotlin-resource" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/out" />
|
<excludeFolder url="file://$MODULE_DIR$/out" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
<orderEntry type="jdk" jdkName="Kotlin SDK" jdkType="KotlinSDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="Gradle: org.jetbrains.kotlinx:kotlinx-html-js:0.6.4" level="project" />
|
<orderEntry type="library" name="Gradle: org.jetbrains.kotlinx:kotlinx-html-js:0.6.4" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:1.2.51" level="project" />
|
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-js:1.2.51" level="project" />
|
||||||
|
|||||||
7
komp.ipr
7
komp.ipr
@@ -65,14 +65,13 @@
|
|||||||
</profile>
|
</profile>
|
||||||
<version value="1.0" />
|
<version value="1.0" />
|
||||||
</component>
|
</component>
|
||||||
<component name="Kotlin2JsCompilerArguments">
|
<component name="MacroExpansionManager">
|
||||||
<option name="sourceMapEmbedSources" />
|
<option name="directoryName" value="qFcQOWli" />
|
||||||
<option name="sourceMapPrefix" />
|
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
|
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/komp.iml" filepath="$PROJECT_DIR$/komp.iml" />
|
<module fileurl="file://$PROJECT_DIR$/komp.iml" filepath="$PROJECT_DIR$/komp.iml" group="komp" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
|
|||||||
@@ -84,9 +84,7 @@ abstract class Komponent {
|
|||||||
|
|
||||||
parent.replaceChild(newElement, oldElement)
|
parent.replaceChild(newElement, oldElement)
|
||||||
|
|
||||||
elements[oldElement]?.also {
|
elements.remove(oldElement)
|
||||||
elements.remove(oldElement)
|
|
||||||
}
|
|
||||||
|
|
||||||
newKomponent.komponent?.also {
|
newKomponent.komponent?.also {
|
||||||
it.kompElement = newKomponent
|
it.kompElement = newKomponent
|
||||||
@@ -183,10 +181,10 @@ abstract class Komponent {
|
|||||||
it.kompElement = newElement
|
it.kompElement = newElement
|
||||||
it.element = replacedElement
|
it.element = replacedElement
|
||||||
|
|
||||||
elements.remove(element)
|
|
||||||
elements[replacedElement] = it
|
elements[replacedElement] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elements.remove(element)
|
||||||
it.rendered = true
|
it.rendered = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user