<iframe align="center" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog.html" frameborder="0" width="728" scrolling="no" height="90"></iframe>
6 . Memory and Resource Management<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
6 内存及资源管理
C++在内存管理方面提供了极大的弹性,但几乎没有多少C++程序员完全通透其理。C++在这一方面,经由重载(overloading)、名称隐藏(name hiding)、构造(constructors)与析构(destructors)、异常(exceptions)、静态函数(static functions)与虚函数(virtual functions)、运算符函数(operator functions)与非运算符函数(non-operator functions),一起为内存管理提供了非凡的弹性和可定制性。而不幸的是——或许也不可避免的是——事情变得有些复杂了。
在本章中,我们来看一看C++的各种语言特征:如何一起用于内存管理;如何时而以令人吃惊的方式相互影响;如何消减其间的相互影响。
内存只是程序所管理的许多资源之一,因此我们还要看一看,如何将其它资源绑定到内存,使我们可以利用C++纷繁的内存管理设施来管理其它资源。
6 内存及资源管理
Gotcha #60: Failure to Distinguish Scalar and Array Allocation
Gotcha条款60:没能区分单体内存分配与数组内存分配
Gotcha #61: Checking for Allocation Failure
Gotcha条款61:检查内存分配失败的情形
Gotcha #62: Replacing Global New and Delete
Gotcha条款62:替换Global New和Global Delete
Gotcha #63: Confusing Scope and Activation of Member new and delete
Gotcha条款63:Member New和Member Delete之生存期与活动空间的迷惑
Gotcha #64: Throwing String Literals
Gotcha条款64:抛出String Literals
Gotcha #65: Improper Exception Mechanics
Gotcha条款65:不够适宜的异常机制
Gotcha #66: Abusing Local Addresses
Gotcha条款66:滥用局部地址空间
Gotcha #67: Failure to Employ Resource Acquisition Is Initialization
Gotcha条款67:没能秉持“Resource Acquisition Is Initialization(资源获取即初始化)”原则
Gotcha #68: Improper Use of auto_ptr
Gotcha条款68:auto_ptr的不当用法
分享到:
相关推荐
C++程序设计陷阱(C++Gotchas)
C++程序设计陷阱(C++Gotchas) 包含中英两个版本
c++程序设计陷阱,中英文都有的哦,很有用的
C++ Gotchas Avoiding Common Problems in Coding and Design 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
C + +的陷阱
Thinking in C++ Accelerated C++ C++ Gotchas C++初学者50个忠告中提及的资料整理[分10卷下载 每卷50M]\C++初学者50个忠告中提及的资料整理[分10卷下载每卷50M].part01
Addison Wesley - C++ Gotchas .chm 好书不用多说~~~
vc编程系列之Addison Wesley - C++ Gotchas
C++很精彩的错误集锦
[AddisonWesley]C++_Gotchas.zip
好的C++ 图书,帮你更加了解C++,希望你学习C++更加愉快
Addison.Wesley.Stephen.C.Dewhurst.C++.Gotchas-.Avoiding.Common.Problems.in.Coding.and.Design
10 C++ Gotchas: Avoiding Common Problems in Coding and Design 11 Efficient C++: Performance Programming Techniques 4. 模板和泛型编程 12 C++ Templates: The Complete Guide 13 Modern C++ Design: Generic...
Addison Wesley - Applied C++ .chm Addison Wesley - C++ FAQs .chm Addison Wesley - C++ Gotchas .chm Addison Wesley - C++ Primer 3rd Ed.chm Addison Wesley - C++ Templates.chm
verilog and systemverilog 101 gotchas.pdf, a good ebook for hardware desinger ant testers.
paper及PPT发表在 SNUG Boston 2006 上。Standard Gotchas-in the Verilog and SystemVerilog Standards That Every Engineer Should Know 。 The Verilog and SystemVerilog standards define hundreds of ...
C++ Gotchas, Essential C++,The C++ Standard Library,EffectiveC++,More Effective C++,Optimizing C++,C++.Coding.Standards.101.Rules.Guidelines等经典书籍.超值1分~