Lifetime of weak local variables with ARC
If I have a piece of code that looks like this: - (void)testSomething { __weak NSString *str = [[NSString alloc] initWithFormat:@"%@", [NSDate date]]; NSLog(@"%@", str); } the output will be (null) because there are no strong references to str and it will be immediately released after I allocate it. This makes sense and is spelled out in the Transitioning to ARC guide. If my code looks like this: - (void)testSomething { __weak NSString *str = [NSString stringWithFormat:@"%@", [NSDate date]]; NSLog(@"%@", str); } then it correctly prints out the current date. Obviously you would expect it to