Fix memory leak on project reimport

#KT-31843 Fixed
This commit is contained in:
Andrey Uskov
2019-06-06 14:52:40 +03:00
parent a447c748bc
commit 5efd55f530
2 changed files with 0 additions and 4 deletions
@@ -24,9 +24,6 @@ import com.intellij.openapi.externalSystem.model.Key as ExternalKey
var DataNode<out ModuleData>.kotlinSourceSet: KotlinSourceSetInfo?
by CopyableDataNodeUserDataProperty(Key.create("KOTLIN_SOURCE_SET"))
var DataNode<out ModuleData>.kotlinTargetDataNode: DataNode<KotlinTargetData>?
by CopyableDataNodeUserDataProperty(Key.create("KOTLIN_TARGET_DATA_NODE"))
val DataNode<ModuleData>.kotlinAndroidSourceSets: List<KotlinSourceSetInfo>?
get() = ExternalSystemApiUtil.getChildren(this, KotlinAndroidSourceSetData.KEY).firstOrNull()?.data?.sourceSetInfos
@@ -241,7 +241,6 @@ open class KotlinMPPGradleProjectResolver : AbstractProjectResolverExtension() {
val compilationDataNode =
(existingSourceSetDataNode ?: mainModuleNode.createChild(GradleSourceSetData.KEY, compilationData)).also {
it.kotlinSourceSet = kotlinSourceSet
it.kotlinTargetDataNode = targetDataNode
}
if (existingSourceSetDataNode == null) {
sourceSetMap[moduleId] = Pair(compilationDataNode, createExternalSourceSet(compilation, compilationData))