DisposeWindow
WindowPtr theWindow ; window to close and dispose DisposeWindow removes a window from the screen, removes it from the window list, and discards all of its data storage, including the WindowRecord.
Notes: Use DisposeWindow if you allowed the system to allocate storage for the WindowRecord; i.e., if you used wStorage=0 in the previous call to If you allocated the WindowRecord storage yourself (e.g., created it as an