• 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: Can I tell which object is retaining my window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I tell which object is retaining my window?


  • Subject: Re: Can I tell which object is retaining my window?
  • From: Drarok Ithaqua <email@hidden>
  • Date: Mon, 31 Jul 2006 19:46:03 +0100

It's It's definitely not my own now. I've got my app to run perfectly, but as soon as I add the 3rd party NSProgressIndicator in,
I get a ton of retain/releases, and my window doesn't dealloc.
A retain cycle sounds like the right term, it seems like an almost infinite loop, but if I set the focus to another app, then back to mine,
the window is dealloced and the massive loop of retain/releases stops.


On 31 Jul 2006, at 7:32 pm, Shawn Erickson wrote:

On 7/31/06, Drarok Ithaqua <email@hidden> wrote:
It's definitely the NSProgressIndicator subclass - it uses
NSNotifications to inform the app what's going on.
It appears that the NSNotification is retaining the window?!

Again what is the issue you are hitting... seeing retain/release sent to an object while your application runs is to be expected. It is also expected that NSNotification will retain the object related to the notification and release that object once all listeners of that notification have had a chance to process the notification.

Using ObjectAlloc you should be able to work out which retain is the
one that appears to be unbalanced if you are having an issue with your
window not going away... to me it sounds like some third party code
(or your own) is retaining your window and causing a retain cycle (for
example a view in a window shouldn't retain its window).

Review... <http://developer.apple.com/documentation/Cocoa/ Conceptual/MemoryMgmt/Concepts/ObjectOwnership.html#//apple_ref/doc/ uid/20000043-1044135>

-Shawn

_______________________________________________ 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
  • Follow-Ups:
    • Re: Re: Can I tell which object is retaining my window?
      • From: "Shawn Erickson" <email@hidden>
References: 
 >Can I tell which object is retaining my window? (From: email@hidden)
 >Re: Can I tell which object is retaining my window? (From: Tommy Nordgren <email@hidden>)
 >Re: Can I tell which object is retaining my window? (From: Drarok Ithaqua <email@hidden>)
 >Re: Re: Can I tell which object is retaining my window? (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: Checking a method for parameter types via SEL
  • Next by Date: Re: Core Recipes question (Migration)
  • Previous by thread: Re: Re: Can I tell which object is retaining my window?
  • Next by thread: Re: Re: Can I tell which object is retaining my window?
  • Index(es):
    • Date
    • Thread