Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] Automagically retained array



On 2 Jul 2006, at 20:00, Antonio Nunes wrote:

On 2 Jul 2006, at 19:21, John Stiles wrote:

Hmm... your app logic shouldn't be relying on exact retain counts. As long as the object is actually freed when it should be, don't sweat it. Internally, the system might be retaining it in all sorts of places.

Exactly, the problem is that the array is not being released, even though I send it a release message when the window controller is deallocated. That's what caused me to look into the retain count.

Thanks John and mmalc for the comments. I was looking in the wrong direction. Turns out I had forgotten to release the objects after adding them to the array. So the array was being released, but the objects weren't, and, seeing the high retain count of the array, I drew a wrong conclusion. But I did learn something more about the internals of the Cocoa frameworks and to not read too much into some retain counts.


Long live this list :-)
António

-----------------------------------------
Forgiveness is the perfume
that the trampled flower casts
upon the heel that crushes it.
-----------------------------------------



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Automagically retained array (From: Antonio Nunes <email@hidden>)
 >Re: Automagically retained array (From: John Stiles <email@hidden>)
 >Re: Automagically retained array (From: Antonio Nunes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.