6 . Memory and Resource Management 6 内存及资源管理 C++在内存管理方面提供了极大的弹性,但几乎没有多少C++程序员完全通透其理。C++在这一方面
Gotcha #61: Checking for Allocation Failure Gotcha条款61:检查内存分配失败的情形 有些问题就是不应该问,“某个内存分配动作是否成功”正
伟大的Bill Gates 曾经失言: 640K ought to be enough for everybody— Bill Gates 1981 程序员们经常编写内存治理程序,往往提心吊
Gotcha #60: Failure to Distinguish Scalar and Array Allocation Gotcha条款60:没能区分单体内存分配与数组内存分配 单
[url=http://www.wangchao.net.cn/shop/redir.html?url=http%3A%2F%2Fai.m.taobao.com%2Fsearc
[url=http://www.wangchao.net.cn/shop/redir.html?url=http%3A%2F%2Fai.m.taobao.com%2Fsearc
Gotcha #64: Throwing String Literals Gotcha条款64:抛出String Literals 许多C++编程教本的作者在展示异常机制时都抛出字符文字
书评:C++ Gotchas Marc Briand 评荐 书 名:C++ Gotchas: Avoiding Common Problems in Coding and Design
C++ Gotchas 条款1及条款17 Stephen C. Dewhurst Gotcha条款1:过渡注释 有许多注释其实是不必要的。其一般都会使得源代码难于阅读和维护,并常
我最喜欢的对资源的定义是:"任何在你的程序中获得并在此后释放的东西。"内存是一个相当明显的资源的例子。它需要用new来获得,用delete来释放。同时也有许多其它类型的资源文件句柄、重要的片断、W