I understand. I read the docs on memory management. Thought I understood it, fixed my code, etc.
Then I pushed it to the phone.

Maybe I need to sleep on this. Though it would have been nice if the simulator really was a simulator.

I was so close, so excited, etc. and then bam! It doesn't work on my phone.

Thanks for at least reassuring me that one day I will grok this memory inside and out.

Ahhhh, java...

James

On Feb 26, 2009, at 5:02 PM, Bill Bumgarner wrote:

On Feb 26, 2009, at 2:58 PM, James Cicenia wrote:
I have used both retain and without:
- (void)applicationDidFinishLaunching:(UIApplication *)application {


        statesArray = [[[NSMutableArray alloc] init]retain];

OK -- you need to step back and think this stuff through. In particular, the above is a double retain and that you tried it with and without indicates that you are taking wild stabs with a hope that something works.

No worries and don't take it as an insult -- we all do this (you should have seen the adventure I had with some header files yesterday! "what if I just stick a semicolon HERE!" no... step back... take a breath... think it through...").

Assuming that the above is executed and statesArray isn't prematurely released (and set to nil or else you'd get a crash), then your bug lies elsewhere.

You say it works in the simulator but not on the device?

I'd suggest stepping through whatever is supposed to fill the array to make sure it is working as expected.

b.bum

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to