我正在尝试解析 google api,以便我可以检索地址及其数据。我在注释行中收到两个错误。为什么我会收到这些错误。我分配了dit,所以我必须正确释放它。这是我检索数据的代码
NSURL *url=[NSURL URLWithString:str];
NSData *data=[[NSData alloc]initWithContentsOfURL:url];
NSString *str1=[[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]autorelease];
NSDictionary *dit=[[[NSDictionary alloc]init]autorelease];//value stored to dit during initialization is never read
dit=[str1 JSONValue];
NSArray *dit1=(NSArray *) [dit objectForKey:@"results"];
NSDictionary *dit3=[[dit1 objectAtIndex:0]objectForKey:@"geometry"];
NSDictionary *dit4=[dit3 objectForKey:@"bounds"];
NSDictionary *northeast=[dit4 objectForKey:@"northeast"];
NSDictionary *lt=[northeast objectForKey:@"lat"];
NSDictionary *southwest=[dit4 objectForKey:@"southwest"];
NSDictionary *lng=[southwest objectForKey:@"lng"];