View Full Version : JSON framework : JSONValue memory leak
namanhams
Jul 4, 2009, 04:50 AM
Hi everyone,
I use Instrument to detect memory leak and i found that there's a leak everytime i use the JSONValue method.
Any idea about this ?
kainjow
Jul 5, 2009, 10:57 PM
Could be a false positive, and it could be a bug in your code. Kind of hard to tell without any code.
namanhams
Jul 7, 2009, 04:39 AM
Here's the code :
NSData *resultData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *resultString = [[NSString alloc] initWithData:resultData encoding:NSUTF8StringEncoding];
NSArray *formList = [resultString JSONValue];
[resultString release];
The Instrument pointed out that the third line has memory leak.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.