Data structures Quote by Scott Meyers
““Other than when dealing with exception-unsafe legacy code (which we'll discuss later in this Item), offering no exception safety guarantee should be an option only if your crack team of requirements analysts has identified a need for your application to leak resources and run with corrupt data structures. As””
About This Quote
Source Book: Effective C++ (Third Edition), 2005
Avoid promising exception safety unless the system can guarantee resource integrity; otherwise, risk leaks and corruption.
In simple terms: Only guarantee exception safety when you can ensure clean resource handling.
Ensure resource safety before offering exception guarantees.
Themes
Mood
Type
When to use this quote
- system design
- code review
- critical systems development
Key Concepts
Questions to Reflect On
- Do you have mechanisms to clean up after exceptions?
- When is it acceptable to for exception safety?
Guaranteeing safety without proper mechanisms leads to instability.