【发布时间】:2011-08-17 12:30:32
【问题描述】:
我故意制造“EXC_BAD_ACCESS”故障。 应用程序当然会崩溃,但调试器不知何故缺少“EXC_BAD_ACCESS”消息。 这是为什么呢?
这是我正在使用的代码:
NSString *str = [[NSString alloc] initWithFormat:@"Foo"];
NSArray *a = [[NSArray alloc ]initWithObjects:str, nil];
[str release];
[a release];
NSLog(@"%@",str);
这是调试器日志:
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 41313.
sharedlibrary apply-load-rules all
(gdb)
【问题讨论】:
-
您使用的开发者或发行版的配置文件是什么?
-
仅仅释放一个对象并不会改变这个对象,它的内存会存在一段未指定的时间。因此,可能不会立即发生引用内存的崩溃。
-
崩溃时有发生。没有任何消息是问题
标签: iphone objective-c ios ios4 xcode4