mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
disposers.md: Add a parameter to MessageBus.connect() for clarity
There is an actual method without parameters.
This commit is contained in:
parent
8a39c6c6d4
commit
d8bfa7def7
@ -168,7 +168,7 @@ Using such methods is always preferable to removing listeners explicitly from th
|
|||||||
To choose the correct parent disposable, use the guidelines from the previous section.
|
To choose the correct parent disposable, use the guidelines from the previous section.
|
||||||
|
|
||||||
The same rules apply to [message bus](messaging_infrastructure.md) connections.
|
The same rules apply to [message bus](messaging_infrastructure.md) connections.
|
||||||
Always pass a parent disposable to `MessageBus.connect()`, and make sure it has the shortest possible lifetime.
|
Always pass a parent disposable to `MessageBus.connect(parentDisposable)`, and make sure it has the shortest possible lifetime.
|
||||||
|
|
||||||
### Determining Disposal Status
|
### Determining Disposal Status
|
||||||
You can use `Disposer.isDisposed()` to check whether a `Disposable` has already been disposed.
|
You can use `Disposer.isDisposed()` to check whether a `Disposable` has already been disposed.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user