flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Plugin leaks memory due to using Project as a root disposable

Open jacob314 opened this issue 3 years ago • 1 comments

https://plugins.jetbrains.com/docs/intellij/disposers.html#the-disposer-singleton "Even though Application and Project implement Disposable, they must NEVER be used as parent disposables in plugin code. Disposables registered using those objects as parents will not be disposed when the plugin is unloaded, leading to memory leaks."

We couple many disposables in the plugin to the project. This will cause problems if we want to make the plugin reloadble without a restart and maybe other memory leaks.

jacob314 avatar Apr 02 '22 01:04 jacob314

I counted 13 uses of project and one use of app.

stevemessick avatar Apr 05 '22 20:04 stevemessick