Question 1 of 19
JavaScript Explicit Resource Management — Quiz
Check your understanding of using, await using, disposal protocols, disposable stacks, and deterministic resource lifetimes.
Knowledge check
JavaScript Explicit Resource Management — Quiz
Check your understanding of using, await using, disposal protocols, disposable stacks, and deterministic resource lifetimes.
- Skip a hard question and review it before your results.
- Questions and answer options can shuffle between attempts.
You can retake this quiz whenever you like.
Question 2 of 19
Which well-known Symbol identifies synchronous disposal?
Question 3 of 19
Which protocol is used for asynchronous disposal?
Question 4 of 19
What does a using declaration do?
Question 5 of 19
What is special about await using?
Question 6 of 19
In what order are resources in a disposal stack released?
Question 7 of 19
What does DisposableStack.use(value) do?
Question 8 of 19
What does DisposableStack.adopt(value, onDispose) provide?
Question 9 of 19
What does DisposableStack.defer(onDispose) register?
Question 10 of 19
What is the purpose of DisposableStack.move()?
Question 11 of 19
What is AsyncDisposableStack for?
Question 12 of 19
Which statement is correct about garbage collection and disposal?
Question 13 of 19
Does using replace try/finally for every purpose?
Question 14 of 19
Can disposal affect the final program completion?
Question 15 of 19
Why feature-detect modern resource-management APIs?
Question 16 of 19
Where should cleanup responsibility usually live?
Question 17 of 19
Why does disposal sometimes create a SuppressedError?
Question 18 of 19
Which relationship is correct?
Question 19 of 19
How does SuppressedError differ from AggregateError?
Quiz results
Review
-
What is the primary purpose of Explicit Resource Management?Hint used
-
Which well-known Symbol identifies synchronous disposal?Hint used
-
Which protocol is used for asynchronous disposal?Hint used
-
What does a using declaration do?Hint used
-
What is special about await using?Hint used
-
In what order are resources in a disposal stack released?Hint used
-
What does DisposableStack.use(value) do?Hint used
-
What does DisposableStack.adopt(value, onDispose) provide?Hint used
-
What does DisposableStack.defer(onDispose) register?Hint used
-
What is the purpose of DisposableStack.move()?Hint used
-
What is AsyncDisposableStack for?Hint used
-
Which statement is correct about garbage collection and disposal?Hint used
-
Does using replace try/finally for every purpose?Hint used
-
Can disposal affect the final program completion?Hint used
-
Why feature-detect modern resource-management APIs?Hint used
-
Where should cleanup responsibility usually live?Hint used
-
Why does disposal sometimes create a SuppressedError?Hint used
-
Which relationship is correct?Hint used
-
How does SuppressedError differ from AggregateError?Hint used