disposers.md: Add a parameter to MessageBus.connect() for clarity

There is an actual method without parameters.
This commit is contained in:
Karol Lewandowski 2025-01-16 08:44:24 +01:00
parent 8a39c6c6d4
commit d8bfa7def7

View File

@ -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.
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
You can use `Disposer.isDisposed()` to check whether a `Disposable` has already been disposed.