Differences in heap and stack in iOS

Source: Internet
Author: User

72594977

Class method

You can write a class method when you do not need to access an instance variable or change the state of an instance.

In Objective-c, there are both instance methods and class methods. Class methods are sometimes referred to as factory methods (Factory method) or as convenient methods (convenience method). The appellation of the factory method is obviously different from the factory method in the general sense, in essence, the class method can be executed independently of the object, so in other languages the class method is sometimes called the static method.

Differences in heap and stack in iOS

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.