mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
11 lines
553 B
Markdown
11 lines
553 B
Markdown
|
|
---
|
||
|
|
sidebar_position: 7
|
||
|
|
---
|
||
|
|
|
||
|
|
# FAQ
|
||
|
|
|
||
|
|
### Q: Do I need to use `await` with CherryPick.closeRootScope(), CherryPick.closeScope(), or scope.dispose() if I have no Disposable services?
|
||
|
|
|
||
|
|
**A:**
|
||
|
|
Yes! Even if none of your services currently implement `Disposable`, always use `await` when closing scopes. If you later add resource cleanup (by implementing `dispose()`), CherryPick will handle it automatically without you needing to change your scope cleanup code. This ensures resource management is future-proof, robust, and covers all application scenarios.
|