dynamic_plugins.md: add "Resource Cleanup"

This commit is contained in:
Yann Cébron 2023-01-09 16:23:02 +01:00
parent 2e0a42fc82
commit 19f2d39863

View File

@ -1,6 +1,6 @@
# Dynamic Plugins
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<link-summary>Making a plugin dynamic allows installing, updating, and uninstalling it without IDE restart, as well as hot reloading plugin changes during the development.</link-summary>
@ -72,6 +72,10 @@ Register [`DynamicPluginListener`](%gh-ic%/platform/core-api/src/com/intellij/id
This can be used to e.g., cancel long-running activities or disallow unload due to ongoing processes.
### Resource Cleanup
Use [](plugin_services.md) implementing [`Disposable`](%gh-ic%/platform/util/src/com/intellij/openapi/Disposable.java) and perform cleanup in `Disposable.dispose()`.
## Troubleshooting
When a plugin is being uninstalled or updated, the IDE waits synchronously for plugin unload and asks for restart if the unload failed.