• 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: Storing bundle loaded main class instances in NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Storing bundle loaded main class instances in NSArray


  • Subject: Re: Storing bundle loaded main class instances in NSArray
  • From: Daniel Luis dos Santos <email@hidden>
  • Date: Wed, 8 Apr 2009 16:48:03 +0100

I just discovered that if I don't load the code through a bundle and link it directly to the executable the error goes away. From the bundle loading code I posted at the beginning of this thread, am I doing anything wrong ?



On Apr 8, 2009, at 4:34 PM, Bill Bumgarner wrote:

On Apr 8, 2009, at 7:55 AM, Daniel Luis dos Santos wrote:
If its outer and the code is done right, it should be disposed of when the code within it is no longer needed

That still isn't correct according to the Cocoa memory management guidelines. Thus, the general conclusion will be that something is over-released and something else subsequently receives messages destined for the over-released object.


A terribly common error, actually -- quite typical.

And this statement:

When I uncomment the addObject line above, later in the code NSFileManager throws a doesNotRespondToSelector exception, which is very odd.

Backs up that assessment.

So... fix your memory management to be in line with the guidelines *then* try and debug the problem. Of course, fixing the memory management might just make the problem go away entirely.

Since this appears to be relatively new code, one possible fix would be to simply turn on GC. If it is a command line tool -- or a daemon -- read the docs on how to start the collector thread.

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: Storing bundle loaded main class instances in NSArray
      • From: Bill Bumgarner <email@hidden>
References: 
 >Fwd: Storing bundle loaded main class instances in NSArray (From: Daniel Luis dos Santos <email@hidden>)
 >Re: Storing bundle loaded main class instances in NSArray (From: Graham Cox <email@hidden>)
 >Re: Storing bundle loaded main class instances in NSArray (From: Daniel Luis dos Santos <email@hidden>)
 >Re: Storing bundle loaded main class instances in NSArray (From: Steve Christensen <email@hidden>)
 >Re: Storing bundle loaded main class instances in NSArray (From: Daniel Luis dos Santos <email@hidden>)
 >Re: Storing bundle loaded main class instances in NSArray (From: glenn andreas <email@hidden>)
 >Re: Storing bundle loaded main class instances in NSArray (From: Daniel Luis dos Santos <email@hidden>)
 >Re: Storing bundle loaded main class instances in NSArray (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Programatically creating NSMenu?
  • Next by Date: Re: Storing bundle loaded main class instances in NSArray
  • Previous by thread: Re: Storing bundle loaded main class instances in NSArray
  • Next by thread: Re: Storing bundle loaded main class instances in NSArray
  • Index(es):
    • Date
    • Thread