Re: NSEnumerator behaves unexpectedly
Re: NSEnumerator behaves unexpectedly
- Subject: Re: NSEnumerator behaves unexpectedly
- From: Conor Dearden <email@hidden>
- Date: Mon, 06 Nov 2006 09:31:42 +0100
> Then I did an enumeration over the array, and lo and behold, the
> last item got an increased retain count.
Chris Kane explained why the last object is retained on this very same list.
http://www.cocoabuilder.com/archive/message/cocoa/2005/3/9/129969
Reading that post might give you an insight as to how memory management
works, and why it's so hard, nearly impossible, to debug leaks using retain
counts. As you found out as an observer it might be hard to understand what
NSEnumerator is doing, but it makes perfect sense to retain and autorelease
the last object. There are other tools and techniques for memory debugging
please use those tools in conjunction with your retain information when
exploring Cocoa.
Regards,
Conor
http://www.bruji.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden