Based on #4512 (comment)
Sometimes com.intellij.util.concurrency.AppDelayQueue$TransferThread could still be running even after we release resources in the IntelliJ platform, and so it holds the classloader and prevents it from being GC-ed.
It doesn't happen on every run, but I was able to reproduce it periodically in cryptography-kotlin. So far, I think it might be related to https://youtrack.jetbrains.com/issue/IJPL-1619, which describes a race condition during closure.
The fix for it was done in JetBrains/intellij-community@0f3694c and so available in261.20362.25 version of the IntelliJ platform.
Dokka can't easily update the platform version, because it should be done first in the Kotlin compiler and Analysis API. Since the fix touches many areas, I wasn't able to create a patch for Dokka, as with other fixes.
The issue could be revisited once Kotlin updates the IntelliJ platform version: https://youtrack.jetbrains.com/issue/KT-82657/Update-IntelliJ-SDK-dependency-to-261.9214.
Based on #4512 (comment)
Sometimes
com.intellij.util.concurrency.AppDelayQueue$TransferThreadcould still be running even after we release resources in the IntelliJ platform, and so it holds the classloader and prevents it from being GC-ed.It doesn't happen on every run, but I was able to reproduce it periodically in cryptography-kotlin. So far, I think it might be related to https://youtrack.jetbrains.com/issue/IJPL-1619, which describes a race condition during closure.
The fix for it was done in JetBrains/intellij-community@0f3694c and so available in
261.20362.25version of the IntelliJ platform.Dokka can't easily update the platform version, because it should be done first in the Kotlin compiler and Analysis API. Since the fix touches many areas, I wasn't able to create a patch for Dokka, as with other fixes.
The issue could be revisited once Kotlin updates the IntelliJ platform version: https://youtrack.jetbrains.com/issue/KT-82657/Update-IntelliJ-SDK-dependency-to-261.9214.