Re: NSWindow alloc/dealloc problems
Re: NSWindow alloc/dealloc problems
- Subject: Re: NSWindow alloc/dealloc problems
- From: j o a r <email@hidden>
- Date: Mon, 29 Nov 2004 10:42:39 +0100
On 2004-11-29, at 10.32, Alex Reynolds wrote:
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.
Are you sure that the problem is not somewhere else? You mention a
"capture" button, sounds like you're using QuickTime? Are you sure that
you've removed all references to your old window from other pieces of
your code? The content view that you assign to your new windows - how
is it created? Are you sure that it's not released and deallocated
together with the first window?
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.
+[NSWindow alloc] doesn't care if you have other window instances or
not - it will create a new window regardless.
Are there tools I can use to keep track of how many targetWindow
objects there really are?
You mean "how many NSWindow instances". You can ask your NSApplication
shared instance for a list of all windows in your application.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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