|
|
|
|
|
by seanalltogether
4913 days ago
|
|
Also for what its worth, variable declarations are not nil by default, this bug tied me up for quite some time. NSString *val;
if(something){
val = @"hello";
}else if(somthingelse){
val = @"goodbye";
}
if(val){
[self display:val];
}
this can send you on a wild goose chase for not declaring val = nil initially. |
|
"Using ARC, strong, weak, and autoreleasing stack variables are now implicitly initialized with nil."
This doesn't affect plain C variables, but it would solve the issue you had above.