Multiple ChoiceBeginner 45s
Rule of zero rationale for resource classes
What does the rule of zero recommend for a class that manages a resource?
Options
- 1Always define all five special member functions by hand so every case is handled explicitly
- 2Delete the destructor to prevent copying and force the resource to be released only manually
- 3Make the class a POD by removing all constructors so it can be copied with memcpy safely
- 4Prefer members like smart pointers and containers so no special member functions need to be written
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.