I'm writing a multi-window program in Cocoa. When a user clicks on a certain button in the main window, it opens a second window, for which I have a custom subclass of NSWindowController. When the user closes that second window, it stays in memory, which is creating a bit of a memory waste, and also can also create the following error message in the console, which is related to the bindings in the window. Any ideas how I can just completely deallocate the window controller when the user closes the window? Given how many windows can be open at once in this window, I'd rather not have any non-open windows taking up active memory space. I've tried using Code: [self dealloc] and Code: [self autorelease] but neither one worked.