On Apr 8, 2010, at 11:03 AM, Patrick M. Rutkowski wrote:

> It turns out that my memory error is coming form somewhere else. If
> you don't mind changing the topic of the thread for a moment:
> 
> I have a Foo object which has an NSMutableArray of Bar objects. The
> Bar objects each have their own NSMutableArray of Baz objects.
> 
> The weird thing is that the Foo and it's array of Bar's are all living
> well and good, but the Bar's are all getting dealloc'd, even though
> their containing parent are still alive.

I assume that 'living well and good' means that they haven't been released? 
Nothing weird about Baz objects (you say Bar but I think you mean Baz) getting 
dealloc'd when their parents are alive: Bar retains its objects when you add 
them, but if you overrelease them somewhere else, being contained in an array 
doesn't prevent them from being deallocated.

> Still digging into it; not quite sure that you guys would even have
> any advice to offer here, I think I'm on my own :-/

Posting code would be helpful if you'd like advice. Meanwhile you could search 
Google for NSZombieEnabled, or just run your application in Instruments with 
the Zombies template to find out what's wrong. If the error is obvious, you 
might even be able to find it with the static analyzer.

Hank

_______________________________________________

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