iphone - Why does this cause a crash? -


<< Html>

These two methods are pressed into these two methods (they are almost identical)

 < Code> - (zero) move on the imagery {int number = [numberofimage intview]; Num--; NumberOfImage = [[NSString stringWithFormat: @ "% i", number] maintained]; // Load the image [self load image]; } - (zero) moveOngeelGelar {int number = [numberofimimage intview]; Number ++; NumberOfImage = [NSString stringWithFormat: @ "% i", number]; // Load the image [self load image]; }   

If I hit one of these two times (or once each, basically if they are called twice) I get an EXC_BAD_ACCESS. If I retain the following: numberOfImage = [[NSString stringWithFormat: @ "% i", num] Maintenance] This is ok though. Can anyone explain why this is? I did an NSZombie on the devices and checked it back on this string with theformat call. thank you in advanced!

+ stringWithFormat: 'new', 'light' So you expect that you want to maintain the return value if you want new NSSTing that it is ready to stick around it.

To add this work, edit duskwuff please:

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -