Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 16, 2008, 06:58 AM   #1
sujithkrishnan
macrumors 6502
 
Join Date: May 2008
Location: Bangalore
Send a message via Yahoo to sujithkrishnan
crash crash [iPhone]

Hi all..


My app is crashing after i navigate between the viewcontrollers so many times...

Also the ApplicationRecievedMemoryWarning getting called...

I have four/five view controllers (dynamically decided)...

as all the viewcontrollers are similar kind i am creating an instance of the same kind and pushing it...

Say in my firstViewController.m

i am pushing "anotherInstanceOfFirstViewController" , but the array used to generate the tableViewCells will vary with sub-levels.

ie..

in firstViewController..
on clicking any cell in tableview


anotherInstanceOfFirstViewController = [[firstViewController alloc]init];
self.menuObj = [self.arrayOfNameForCells objectAtIndex:someNumber];
anotherInstanceOfFirstViewController.arrayOfNameForCells = self.menuObj.arrayOfNames;
push self.anotherInstanceOfFirstViewController



I am releasing the anotherInstanceOfFirstViewController in dealloc (But the retainCount is not zero in dealloc )...

Moreover the app crashing after some forward/backward navigation ....

So in the ne

Last edited by sujithkrishnan; Jul 16, 2008 at 07:39 AM.
sujithkrishnan is offline   0 Reply With Quote
Old Jul 16, 2008, 02:55 PM   #2
SwampThingTom
macrumors member
 
Join Date: Jul 2008
Location: Fairfax, VA
You almost certainly have a memory leak. Use the Instrumentation application to find it. It makes it trivial to find exactly the line of code where the leak occurs so you can find out why it's not being released.

Tom
SwampThingTom is offline   0 Reply With Quote
Old Jul 17, 2008, 03:58 AM   #3
sujithkrishnan
Thread Starter
macrumors 6502
 
Join Date: May 2008
Location: Bangalore
Send a message via Yahoo to sujithkrishnan
Quote:
Originally Posted by SwampThingTom View Post
You almost certainly have a memory leak. Use the Instrumentation application to find it. It makes it trivial to find exactly the line of code where the leak occurs so you can find out why it's not being released.

Tom
But the leak is showing in lines like where i am unarchiving....

also..

NSData *data = [[NSData alloc]initWithURL:myURL];

Noty getting what is leaking here....

I am releasing data soon after using it to make an UIImage ...
sujithkrishnan is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone Crash Erased All Messages mrockm01 iPhone 7 Jul 19, 2012 04:33 PM
App crashes when Archived using Release but works fine with Debug... dbramhall iPhone/iPad Programming 5 Apr 17, 2012 07:49 PM
iBlacklist Problems - Keeps crashing iPhone 4 SteffiT Jailbreaks and iOS Hacks 5 Jan 8, 2012 01:59 PM
Crash when trying to load a Custom NIB John Baughman iPhone/iPad Programming 5 Mar 30, 2011 09:43 PM
Application crashes with EXC_BAD_ACCESS SimonBS iPhone/iPad Programming 12 Feb 13, 2011 04:20 PM


All times are GMT -5. The time now is 04:47 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC