mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
dynamic_plugins.md: add "Resource Cleanup"
This commit is contained in:
parent
2e0a42fc82
commit
19f2d39863
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user