Re: Storing bundle loaded main class instances in NSArray
Re: Storing bundle loaded main class instances in NSArray
- Subject: Re: Storing bundle loaded main class instances in NSArray
- From: Bill Bumgarner <email@hidden>
- Date: Wed, 08 Apr 2009 08:34:30 -0700
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