And here is an example where the programmer (me) explicitly codes a subclass of UI::HtmlDialog that keeps a reference to itself internally whilst the window is open, then releases it when it is closed. (Although this is not the primary purpose of the subclass nor the example. Just thought I’d add it to show that, if it’s desired, it can be done. In a way it is an example of the coder having control and writing his object so it partially controls it’s own persistence. Ie, an external reference will still prevent GC.)