PharoLauncher is currently leaking AnnouncementSubscriptions when its window closes. I'm not sure with Spec how to ensure actions are performed when the window is closed, but I have been able to achieve this with the following modification [1] which is...
-----
   WindowModel>>windowIsClosing
       isClosedHolder value: true
       self model windowIsClosing  "<----proposed modification"
-----

I investigated with a halt in SpecWindow>>close to trace through and discover that it calls...
SpecWindow(StandardWindow)>>delete, which in my non-fullscreen-case calls...
SpecWindow(SystemWindow)>>delete, which "model windowIsClosing" calls...
MorphicWindowAdaptor>>windowIsClosing, which "self model windowIsClosing" calls...
WindowModel>>windowIsClosing, which does only "isClosedHolder value: true"

That last line happens to hold aPharoLauncher in its 'model' instance variable, so with the above proposal I can implement PharoLauncher>>windowIsClosing to unregister the announcer.
Any problem expected with that modification?

[1] https://pharo.fogbugz.com/f/cases/12677

cheers -ben




Reply via email to