【发布时间】:2010-12-29 21:39:24
【问题描述】:
我点击了equals,它运行所有代码并清楚地到达终点,运行它并到达终点并NSLogs它。在这一点上,它已经没有什么可做的了......期望无缘无故地给我一条错误消息,知道为什么吗? 谢谢!
-(IBAction) clickEquals: (id) sender {
// more stuff is actually insider here, omitted for brevity.
[self clear];
}
- (void)clear {
// more stuff is actually insider here, omitted for brevity.
[accumulator clear];
NSLog(@"clear - done");
}
控制台
2010-12-29 15:24:38.328 应用程序[6150:207] 清除 - 完成
app(6150,0xa01e7540) malloc: * * * 错误 对于对象 0x7146840:指针正在 freed 未分配 * * * 在 malloc_error_break 中设置断点进行调试
(gdb)
【问题讨论】:
-
从你粘贴的代码 sn-ps 很难看出。如果您能够提供重现错误的最小测试用例,您可能会得到准确的答案。
-
你知道错误信息是什么意思吗?
标签: objective-c malloc