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 09-07-2011, 07:49 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 47
paul_1991 is on a distinguished road
Default Memory Warning! Need help to solve!

Hi!
I have a problem of memory warning in my app... it works perfect on simulator but crash after some operation on the device... I use instruments to look for memory leaks and I found some of them in the init method and getSubscriptionList of this class....
I can't solve!!!! Someone can help me?
thanks


This is the class


Code:
//
//  GoogleReader.h
//  A wrapper around Google Reader API
//
//

    #import <Foundation/Foundation.h>
    #import "SBJsonParser.h"
    #import "GDataOAuthAuthentication.h"
    #import "MWFeedParser.h"
    #import "SubscriptionArray.h"
    #import "CountingArrayClass.h"
    #import "CategoryArray.h"
    
    #define kAppServiceName @"Google Reader App"
    
    @protocol GoogleReaderRequestDelegate<NSObject>
    
    - (void)didFinishRequest;
    - (void)GoogleReaderRequestDidFailWithError:(NSError *)error;
    - (void)GoogleReaderRequestDidLoadJSON:(NSDictionary *)dict;
    - (void)GoogleReaderRequestDidLoadFeed:(NSString *)feed;
    - (void)GoogleReaderRequestReceiveBytes:(float)partial onTotal:(float)total;
    
    @optional
    
    - (void)GoogleReaderRequestDidAuthenticateWithUser:(NSDictionary *)userDict;
    - (void)GoogleReaderRequestSendBytes:(float)partial onTotal:(float)total;
    
    @end
    
    
    @interface GoogleReader : NSObject <MWFeedParserDelegate>
    {
    	// public delegate
    	id <GoogleReaderRequestDelegate> delegate;
    	
    	// private
    	NSString *token;
    	SBJsonParser *JSON;
    	NSURLConnection *web;
    	NSHTTPURLResponse *response;
    	NSURLResponse *URLresponse;
    	NSMutableDictionary *headerArgs;
    	NSMutableDictionary *getArgs;
    	NSMutableDictionary *postArgs;
    	NSError *error;
    	NSError *JSONerror;
    	NSMutableData *responseData;
    	NSData *staticResponseData;
    	NSNumber *expectedResponseLength;
    	GDataOAuthAuthentication *oauthAuthentication;
    	
    	NSMutableArray *feedItems;
    	
    	BOOL requiresAuthentication;
        NSMutableArray *subscriptions;
    
    
        
        
    }
    @property(nonatomic, retain) NSURLConnection *web;
    @property(nonatomic, retain) NSMutableData *responseData;
    @property(nonatomic, retain) GDataOAuthAuthentication *oauthAuthentication;
    @property(nonatomic, readonly) NSArray *feedItems;
    @property(readonly) BOOL requiresAuthentication;
    
    @property(nonatomic, retain) NSMutableArray *subscriptions;
    
    
    
    // instance methods
    - (id)init;
    - (void)setDelegate:(id)d;
    
    // low level api methods
    - (void)getAllFeeds;
    - (void)getFeedWithFeedName:(NSString *)feedName orURL:(NSString *)url excludeTarget:(NSString *)exclude;
    
    // medium level api methods
    - (void)getPreference;
    - (void)getSubscriptionsList;
    - (void)getTagList;
    - (void)getUnreadCountList;
    
    // high level api methods
    - (void)addSubscriptionWithURL:(NSString *)url feed:(NSString *)feed labels:(NSArray *)labels;
    - (void)deleteSubscribptionWithFeedName:(NSString *)feed;
    - (void)getUnreadItems:(int) max;
    - (void)setUnread:(MWFeedItem *)entry;
    - (void)setRead:(MWFeedItem *)entry;
    - (void)addStar:(MWFeedItem *)entry;
    - (void)deleteStar:(MWFeedItem *)entry;
    - (void)addPublic:(NSString *)entry;
    - (void)deletePublic:(NSString *)entry;
    - (void)addLabel:(NSString *)label toEntry:(NSString *)entry;
    - (void)deleteLabel:(NSString *)label toEntry:(NSString *)entry;
    
    //ADDED
    - (void)getSpecificFeedItems:(NSString *)url;
    - (void)getRequestForCurrentUrl:(NSString *)url;
    
    @end

and the implementation file is:
paul_1991 is offline   Reply With Quote
Old 09-07-2011, 08:54 AM   #2 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

You forgot to post the implementation.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.

New app - See screenshots and details at www.globaclock.com.

If you want to thank me, click the link. Every click counts. If you want to do more, buy my app. A link is available on my website. Thanks.
Domele is offline   Reply With Quote
Old 09-07-2011, 10:33 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 47
paul_1991 is on a distinguished road
Default

and here is my implementation file.
Attached Files
File Type: txt google reader.txt (18.6 KB, 4 views)
paul_1991 is offline   Reply With Quote
Reply

Bookmarks

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: 376
8 members and 368 guests
apatsufas, JackReidy, jeroenkeij, Sami Gh, tim0504, UMAD, yomo710
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,671
Threads: 94,121
Posts: 402,904
Top Poster: BrianSlick (7,990)
Welcome to our newest member, JackReidy
Powered by vBadvanced CMPS v3.1.0

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