Re: [SOLVED] Automagically retained array
Re: [SOLVED] Automagically retained array
- Subject: Re: [SOLVED] Automagically retained array
- From: Antonio Nunes <email@hidden>
- Date: Mon, 3 Jul 2006 09:22:04 +0100
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:
This email sent to email@hidden