Re: NSWindow alloc/dealloc problems
Re: NSWindow alloc/dealloc problems
- Subject: Re: NSWindow alloc/dealloc problems
- From: Alex Reynolds <email@hidden>
- Date: Mon, 29 Nov 2004 04:32:52 -0500
I tried [targetWindow release] and I get the same crash.
I have also tried:
[targetWindow setReleasedWhenClosed:YES];
when the targetWindow is allocated.
When I then try [targetWindow close], the first time I release my
targetWindow it seems to work, but then when I allocate targetWindow
again, it crashes with a type 11 error.
I think only one targetWindow is being allocated, so I don't know why
[targetWindow close] doesn't release that one object, so that the
[NSWindow alloc] can run properly.
Are there tools I can use to keep track of how many targetWindow
objects there really are?
-Alex
On Nov 29, 2004, at 4:24 AM, j o a r wrote:
On 2004-11-29, at 10.07, Alex Reynolds wrote:
[targetWindow dealloc];
Have you read the documentation for the "dealloc" method?
What you need to do is to balance your retain-release calls properly.
You should either just release / autorelease the window, or if you
have set it to "release when closed", simply close it.
j o a r
_______________________________________________
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