RE: REPOST: loadNibNamed and retain counts
RE: REPOST: loadNibNamed and retain counts
- Subject: RE: REPOST: loadNibNamed and retain counts
- From: "Andrew Mellinger" <email@hidden>
- Date: Thu, 20 Oct 2005 14:41:41 -0400
- Thread-topic: REPOST: loadNibNamed and retain counts
Haris,
Thanks for the reply!
At the termination of my app (applicationShouldTerminate) I walk through the app's window list and any windows and controllers that I've already 'closed' are still there. When I get the window will close message I autorelease the window controller so it should be cleaned up. It is my understanding that a loadNibNamed should generate a window controller with on one retain.
The only reasons that I think I have a release is because the window stays around in NSApp's window list until terminate even after close.
So I *think* I have enough releases.
-Andrew
-----Original Message-----
From: Charilaos Skiadas [mailto:email@hidden]
Sent: Thu 10/20/2005 2:22 PM
To: Andrew Mellinger
Cc: email@hidden
Subject: Re: REPOST: loadNibNamed and retain counts
On Oct 20, 2005, at 12:49 PM, Andrew Mellinger wrote:
> Everyone,
>
> I didn't get any hits before so I thought I'd troll this again.
>
> Does anyone have any ideas at all?
>
Whenever this question comes up, the answer is always the same: Don't
focus too much on the retain counts, they can mislead you. Lots of
objects/controllers/bindings might retain your window, for whatever
internal purposes of the designers of AppKit, or implementation
particulars of the corresponding classes. The thing you are
responsible for is making sure to balance your init/retains with
(auto)releases.
What makes you think you are leaking objects?
Have you profiled your app?
Are you managing your retain/releases properly?
> -Andrew
>
Haris
_______________________________________________
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