You want to use the resource via an instance of a RAII-class. In which of the given scenarios can this be achieved?
1. The RAII-class has automatic storage duration.
2. The RAII-class has lifetime that is bounded by the lifetime of an automatic object.
Options
- Only 1
- Only 2
- Both 1 and 2
- Neither 1 nor 2