How Objective-C handles the memory of immutable strings [duplicate]
问题 This question already has answers here : Do I need to release a constant NSString? (2 answers) Closed 6 years ago . In my research I've come across something peculiar. @interface Class { NSString *_string } - (void) Method1 { _string = @"ASDF"; } Intially I thought that _string was part of the autorelease pools and really didn't think about the memory aspect of it. After reading this SO post Objective C NSString* property retain count oddity I've realized that no, this is not the case, and