Question 9
Back to Exercise
What does RAII hide from the user of a class like std::lock_guard or std::ifstream?
- A The type of the resource
- B The need to release the resource manually – the destructor does it on every path Correct
- C The size of the object
- D The constructor
Correct Answer: Option B
Release happens on normal exit, early return and exceptions alike.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!