Window Controller not being released.
Window Controller not being released.
- Subject: Window Controller not being released.
- From: "Josh Ferguson" <email@hidden>
- Date: Tue, 22 Oct 2002 11:25:40 -0500
- Thread-topic: Window Controller not being released.
I'm having some troubles with my document based app not releasing the window controller. I've watched the retain and release calls to see what objects are retaining the controller, but unfortunately, I can't match up each call to release with each call to retain to tell which retain isn't getting released. Basically, here's what's happening:
1.) in the Document's makeWindowController method, I allocate the controller ([[controller alloc] initWithNibName]) which sends a retain request
2.) I call [document addWindowController]
3.) I manually release the window controller from step 1
4.) in the image controller, I set up a connection between two threads, which retains/releases 5/6 times
5.) after closing the window, the window sends a few retain/release calls
and I'm left with a retain count of 1 (and a seriously leaky program). Do I need to manually remove the controller from the document? I've noticed that when the document's dealloc method is called, the windowController array is empty (so I would assume it's automatically getting removed). If I do need to call removeWindowController:, where should I do that? I'm also wary of the NSConnection that I create. Do I need to "close" the connection or anything before I deallocate it? Anybody have any recommendations?
Thanks,
Josh Ferguson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.