- 1、本文档共8页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
[B8设计论文C外文文献中英文翻译Object1
皮晨晖 软件081班7023108043
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. This places a priority on the speed of storage allocation and release, and control of these can be very valuable in some situations. However, you sacrifice flexibility because you must know the exact quantity, lifetime, and type of objects while youre writing the program. If you are trying to solve a more general problem such as computer-aided design, warehouse management, or air-traffic control, this is too restrictive.
The second approach is to create objects dynamically in a pool of memory called the heap. In this approach, you dont know until run-time how many objects you need, what their lifetime is, or what their exact type is. Those are determined at the spur of the moment while the program is running. If you need a new object, you simply make it on the heap at the point that you need it. Because the storage is managed dynamically, at run-time, the amount of time required to allocate storage on the heap is significantly longer than the time to create storage on the stack. (Creating storage on the stack is often a single assembly instruction to move the stack pointer down, and another to move it back up.) The dynamic approach makes
您可能关注的文档
- [云存储介绍.ppt
- [android里面的SDK的环境变量配置.docx
- [Android软件开发教程sundy.doc
- [Android软件搬家内存更大.doc
- [第五章;人员招聘.ppt
- [第五章5·句子.ppt
- [第五章css样式.ppt
- [第五章GATT与WTO.ppt
- [Android高级笔记.doc
- [第五章Oracle数据库管理.ppt
- 智慧物流园区信息化建设中的信息安全与风险防范报告.docx
- 有您真好600字六年级作文小学作文通用8篇.docx
- 环卫行业新能源车辆无人驾驶改造投资策略与风险规避指南.docx
- 2025-2026学年小学美术三年级上册浙美版(2024)教学设计合集.docx
- 环卫行业新能源车辆无人驾驶技术改造项目风险评估与管理策略.docx
- 2025-2026学年小学美术三年级下册沪教版(2024)教学设计合集.docx
- 我的自行车生活中的好朋友写物[13篇].docx
- 5G时代数据中心能效提升与设备选型指南报告.docx
- 教育培训机构在幼儿教师数字素养提升中的角色.docx
- 环卫行业新能源电动车辆采购成本控制与调度效果研究报告.docx
最近下载
- 转正合同协议.docx VIP
- 糖尿病优秀ppt课件.pptx VIP
- 《区域地理-东南亚(第课时)》-公开课件(设计).ppt VIP
- 2025年农村环保问题解析:十种废弃物资源化利用创新模式研究.docx
- 药食同源-公开课件.ppt VIP
- 回收废弃农作物秸秆项目备案申请可行性研究报告.docx
- 消食类药食同源中药的合理应用教材(PPT 74页).ppt VIP
- 犀牛角及其制品鉴定识别方法的研究.doc VIP
- 药食同源食物介绍PPT课件.pptx VIP
- Unit 1 Helping at home Part A (3) Let's spell 课件2025-2026学年度人教PEP版英语四年级上册.pptx VIP
文档评论(0)