• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [SOLVED] Automagically retained array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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>)

  • Prev by Date: Reg : Using Cocoa Framework in Cocoa Java Application.
  • Next by Date: Re: Shiny little square buttons
  • Previous by thread: Re: Automagically retained array
  • Next by thread: Re: Automagically retained array
  • Index(es):
    • Date
    • Thread