对象的创建和存在时间(含外文出处)

以下是资料介绍,如需要完整的请充值下载. 本资料已审核过,确保内容和网页里介绍一致.  
无需注册登录,支付后按照提示操作即可获取该资料.
资料介绍:

对象的创建和存在时间(含外文出处)(中文3400字,英文1700字)
摘要:本文件要介绍了对象的创建和存在时间,以及操纵对象时要考虑的一些因素,也介绍了关于对象存在时间的一些知识。阐述了对象创建过程需要注意的问题。重点介绍了集合与继承器和单根结构。
对象的创建和存在时间
从技术角度说,OOP(面向对象程序设计)只是涉及抽象的数据类型、继承以及多形性,但另一些问题也可能显得非常重要。本节将就这些问题进行探讨。

OBJECT LANDSCAPES AND LIFETIMES
Technically, OOP is just about abstract data typing, inheritance, and polymorphism, but other issues can be at least as important. The remainder of this section will cover these issues.
One of the most important factors is the way objects are created and destroyed. Where is the data for an object and how is the lifetime of the object controlled? There are different philosophies at work here. C++ takes the approach that control of efficiency is the most important issue, so it gives the programmer a choice. For maximum run-time speed, the storage and lifetime can be determined while the program is being written, by placing the objects on the stack (these are sometimes called automatic or scoped variables) or in the static storage area.