我正在使用大量图像下载和数据解析进行 JSON 数据解析。我有以下解析代码
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSString *responseString = [[NSString alloc] initWithData:webdata encoding:NSASCIIStringEncoding];
[webdata release];
[connection release];
NSDictionary *values = [(NSDictionary*)[responseString JSONValue] objectForKey:@"UserId"];
NSDictionary *Active = [(NSDictionary*)[responseString JSONValue] objectForKey:@"Active"];
[responseString release];
NSString *UserID=[NSString stringWithFormat:@"%@",values];
NSString *Status=[NSString stringWithFormat:@"%@",Active];
[WSDelegate WServiceResponseMsg:@"WS_Authenticate_User" withResponse:UserID forParam:Status];
}
我有许多具有上述代码的类用于解析,但由于 SBJSON 解析器,应用程序在一段时间后崩溃。在仪器中,由于内存不足警告,它使应用程序崩溃。