Re: Can I tell which object is retaining my window?
Re: Can I tell which object is retaining my window?
- Subject: Re: Can I tell which object is retaining my window?
- From: Matt Neuburg <email@hidden>
- Date: Sun, 30 Jul 2006 08:18:32 -0700
- Thread-topic: Can I tell which object is retaining my window?
On Sun, 30 Jul 2006 15:52:32 +0100, Mike Abdullah <email@hidden>
said:
>Well, for a start, why are you retaining an object that you've just
>initialized?
>
>Mike.
>
>On 30 Jul 2006, at 15:40, email@hidden wrote:
>
>> And so on. I'm creating the window in code like so:
>> floatingWindow = [[[DashboardWindow alloc] init] retain];
Mike's right - you're creating / releasing the window wrong (from a memory
management point of view). Another thing to point out that is you should not
care what object is retaining your window. In general, you should never care
about retain counts; you shouldn't look at them. Just do all the memory
management that is up to you correctly (which you are not doing here), and
trust the rest of the framework to do its memory management correctly too.
If there's a problem, you'll get a zombie or a leak, and you can discover
that easily enough with the performance tools. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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