iphone - Receiving memory leak -
i new iphone development. displaying lots of images on view.also put button named load more more images.i downloading images on load more event. here code:`
-(void)btnloadmorepressed { [appdelegate showloader:mbprogresshudmodeindeterminate]; requestresponsemanager *requestmanager=[requestresponsemanager sharedinstance]; [requestmanager setrequestpropery:self extrainfo:nil]; album *album=[appdelegate.currentuser.albumlistarray objectatindex:indexnum-1]; nsarray *obj_keys = [nsarray arraywithobjects:@"userid",@"albumid",@"sessionid",@"pageno",@"modmethod", nil]; nsarray *objects = [nsarray arraywithobjects:appdelegate.currentuser.userid,album.albumid,appdelegate.sessionid,[nsstring stringwithformat:@"%d",currentpage],@"getphotolistbyalbumid",nil]; nsdictionary *jsondictionary = [nsdictionary dictionarywithobjects:objects forkeys:obj_keys]; nsstring *jsonstring = [jsondictionary jsonrepresentation]; nsstring *requeststring=[nsstring stringwithformat:@"data=%@",jsonstring]; currentrequest=jgetalbumphotolist; [requestmanager sendposthttprequest:get_user_album_photo_url requesttype:jgetalbumphotolist postcontent:requeststring]; } but when trying fetch more images,it gives me memory warning , crashing.please me.thanking you...
release objects had created , set objects null, in dealloc method.
for ex:
- (void)dealloc { [super dealloc]; [image1 release]; image1=nil; }
Comments
Post a Comment