When I first came into contact with obj-C, I always had no idea what to release, what to release, and when to release. Although automatic reference counting is provided after xcode4.2, the IOS coder around me tells me not to use this because it is less efficient.
According to my understanding, there are two types of objects that need to be manually released, that is, those created by alloc and those created by new. The basic data types and cgpoint (struct) and bool (basic data types) are also written in
@ Interface {} does not need to be manually released.
To put it simply, only the @ property object in the H file and the alloc & new object in the M file need to be stored.
Objects to be released must first be converted to nil in viewdidunload, and finally be release in dealloc. All page Hard references, such as uitextview, need to be done in this way. Objects except page Hard references must be created, assigned values, and released immediately after use.
Follow the rule "if it is not assigned or retained, it does not need to be released"