Closed windows remain allocated


In testing the code introduced in ch. 14 (Using Notifications), I noticed that if I open, say, three RMDocument windows, then open the preferences panel, and make changes to the background color, all windows receive the notification. Good.

Then, if I close, say, two of the three windows, and then change the background color in the preferences panel, I still see three notifications being sent and received.

I tried checking “Release when closed” in IB for the RMDocument xib, to no avail.

Is there a way to deallocate a window when it is closed, so the unnecessary notifications (among other workload) won’t happen?

And, is there a way to reopen the very same window once it has been closed? (without actually doing File -> Open and reloading the window).