开发者

Bad_ACCESS error i dont quite understand

开发者 https://www.devze.com 2023-04-03 04:57 出处:网络
i get a bad_access error when i try to run my program, normally i can figure this stuff out but when i get the error it jumps me to this line of 开发者_如何学Gocode.

i get a bad_access error when i try to run my program, normally i can figure this stuff out but when i get the error it jumps me to this line of 开发者_如何学Gocode.

int retVal = UIApplicationMain(argc, argv, nil, nil);

I did not write whats above, but when i remove the following program runs fine...

NSLog(@"Store Data Count : %i", [storedData count]);
if ([storedData count] < 4) {

It was working before, and storedData is an NSMutableDictionary. I dunno if thats enough info, but if anyone could let me know what going on that would be really awesome. Thanks!


This means you've messed up your memory management and either over-released an object or sent a message to an object that's been released. Turn on NSZombieEnabled and you'll probably find out where very quickly.


If you are creating the storeData outside the method that you are using it, make sure your storedData is retained and not be released anywhere before you use it.

0

精彩评论

暂无评论...
验证码 换一张
取 消