たくさんの画像をダウンロードしてデータを解析する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パーサーが原因で、しばらくするとアプリがクラッシュします。インストルメントでは、メモリ不足の警告が原因でアプリがクラッシュします。