• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why doesn't this work on my device?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why doesn't this work on my device?


  • Subject: Re: Why doesn't this work on my device?
  • From: James Cicenia <email@hidden>
  • Date: Thu, 26 Feb 2009 17:23:11 -0600

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Why doesn't this work on my device?
      • From: Bill Bumgarner <email@hidden>
References: 
 >Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Jason Foreman <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Bill Bumgarner <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Test if app run by Guest account?
  • Next by Date: Re: Why doesn't this work on my device?
  • Previous by thread: Re: Why doesn't this work on my device?
  • Next by thread: Re: Why doesn't this work on my device?
  • Index(es):
    • Date
    • Thread