Effective c++ 学习笔记(原书好的英文表达)
这次凑个更新
- it becomes clear that ad hoc ways of dealing with resource management aren't sufficient.
- this approach can all but eliminate resource management problems.
- the standard library's auto_ptr is tailormade for this kind of situation.
- as a final comment, I have to point out that createInvestment's raw pointer return type is an invitation to a resource leak.
- Resource-managing classes are wonderful. They're your bulwark against resource leaks.
- never sullying your hands with direct access to raw resources.
网友评论