Item 17: Store newed objects in smart pointers in standalone statements.(Effective C++)
2011-03-23 21:52
387 查看
Store newed objects in smart pointers in standalone statements. Failure to do this can lead to subtle resource leaks when exceptions are thrown.
相关文章推荐
- Effective C++ Item 17 Store newed objects in smart pointer in standalone statements
- Effective C++ 17. Store newed objects in smart pointers in standalone statements
- 条款17:以独立语句将newed对象置入智能指针(Store newed objects in smart pointers in standalone statements)
- [Effective C++] Rules 17: Store newed objects in smart pointers in standalone statements
- [翻译] Effective C++, 3rd Edition, Item 17: 在 standalone statements(独立语句)中将 new 出来的 objects(对象)存入 smart pointers(智能指针)
- Effective C++ Item 17 以独立语句将newed对象置入智能指针
- Item 28: Smart pointers.(More Effective C++)
- Item 2: Prefer consts, enums, and inlines to #defines(Effective C++)
- [翻译] Effective C++, 3rd Edition, Item 4: 确保 objects(对象)在使用前被初始化
- Effective C++ Item 16 Use the same form in corresponding uses of new and delete
- Effective JavaScript Item 49 对于数组遍历,优先使用for循环,而不是for..in循环
- [翻译] Effective C++, 3rd Edition, Item 13: 使用 objects(对象)管理资源
- Item 10:Prevent resource leaks in constructors.(More Effective C++)
- Store and retrieve objects in SQL Server
- [翻译] Effective C++, 3rd Edition, Item 38: 通过 composition(复合)模拟 "has-a"(有一个)或 "is-implemented-in-terms-of"(是根据……实现的)
- Effective C++ Item 2:Prefer constS, enumS, and inlineS to #defineS
- Item 43: Know how to access names in templatized base classes(Effective C++)
- effective C++ Item 2: Prefer consts, enums, and inlines to #defines
- Effective C++ Item 10,11 Have assignment operators return a reference to *this Handle assignment to self in operator =
- Smart Pointers in Boost