Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-28-2011, 09:54 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 83
djp_phillips is on a distinguished road
Default JSON library memory leak

Hi guys, I'm having a hard time finding out why this is causing a leak, could you have a look and see if I'm missing something please ?

Code:
-(NSDictionary*)getJsonDataObject:(NSString*)string{
    SBJsonParser *parser = [[SBJsonParser alloc] init];
    NSDictionary *data = [NSDictionary dictionaryWithDictionary:(NSDictionary*)[parser objectWithString:string error:nil]];
    [parser release];
    return data;
}
Stack Trace:


Leaked Blocks:


The bad line:

Last edited by djp_phillips; 03-28-2011 at 09:57 AM. Reason: Added line highlight of the actual line with problem.
djp_phillips is offline   Reply With Quote
Old 03-28-2011, 09:59 AM   #2 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

It's not that particular line that has the issue. The issue is in the parser, which is not this code.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 03-28-2011, 10:01 AM   #3 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 83
djp_phillips is on a distinguished road
Default

Quote:
Originally Posted by BrianSlick View Post
It's not that particular line that has the issue. The issue is in the parser, which is not this code.
That's what I thought, but as I downloaded what was meant to be stable code, I don't really want to mess around in there.

Do you think I should just let it leak ?
djp_phillips is offline   Reply With Quote
Old 03-28-2011, 10:10 AM   #4 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Shouldn't be that hard to fix.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Reply

Bookmarks

Tags
json, leak, loop, memory

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 369
12 members and 357 guests
condor304, dansparrow, dre, dreamdash3, ilmman, LezB44, michelle, Objective Zero, Sami Gh, shagor012, thephotographer, tinamm64
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:36 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0