Hi, I have got a problem with NSString.
NSString* str = [[NSString alloc] initWithString:@"Hello world"];
In the code above, do I need to release the object str? According to the rule, this object is created with alloc, so it should be explicitly released with the release method. However, I can't find any memory leaks in Instruments when I don't explicitly release it. When the NSString is replaced with NSNumber, the memory leaks happen.
Can anyone give me some suggestions? Thanks.