Nissin Kuibu 02

Source: Internet
Author: User

Important ideas Continue:

1. Object creation and Presence time: where is the data required for the object? How do you control the "time to exist" of an object?

Method one, C + + believes that the execution efficiency of the program is the most important, so allow programmers to get the fastest running speed, self-determination of storage and the existence of time-just put the object on the stack or static storage area, while sacrificing flexibility, because the program must be written accurately know the number of objects, the existence of time and type.

Method Two, create the object dynamically in the memory pool and call the memory pool "heap" or "Memory heap". In this way, you do not know how many objects are actually needed, and do not know the time of existence and the exact type, unless you enter a runtime.

Nissin Kuibu 02

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.