我的应用中出现以下错误:
warning:Unable to restore previously selected frame
warning:Unable to restore previously selected frame
使用以下代码时:
NSDictionary *feed = [json_parser objectWithString:json_str error:nil];
for(NSDictionary *feed_item in [feed objectForKey:@"items"])
{
PropertyData *propertyData; // mere data model class with properties only,no methods
[propertyData release];
}
此行突出显示主题1:收到收到的信号:“EXC_BAD_ACCESS”
[propertyData release];
在解析之前,json字符串看起来如下所示(因此您可以理解数据的结构,但解析工作正常):
{
"total":110,"page":1,
"items":[
{"pid":"1349","price":"52,000","type":"Apartment","beds":"","descr1":"<p></p>"},
{"pid":"1349","price":"52,000","type":"Apartment","beds":"","descr1":"<p></p>"},
{"pid":"1349","price":"52,000","type":"Apartment","beds":"","descr1":"<p></p>"}
]
}
知道什么是错的?
求助,
的Stephane
答案 0 :(得分:1)
您没有分配/初始化PropertyData。指针指的是内存中的一些随机位置,然后你发送它“释放”消息,导致EXC_BAD_ACCESS,