close

fun close()

Hands this editor's module back. An editor is finished with after this.

It does not free the file. analyze also registers every module in caches with no removal API — the standalone KotlinModuleDependentsProvider's soft-keyed map, and at least one more — so the PSI tree stays reachable until the heap genuinely fills, at which point it is reclaimed in full. A soft cache, not a leak — the bound on it is reusing editors.