On Fri, Nov 14, 2014 at 12:01 PM, stepharo <stepharo@free.fr> wrote:
I checked a bit deeper
Nautilus is not implemented in Spec. But senders and implementors are and they also leak memory. Around 400 Announcers after each opening and closing.
Now
whenChangedDo: aBlock
| block | block := [:announcement :ann | aBlock cull: announcement newValue cull: announcement oldValue cull: announcement cull: ann ]. announcer when: ValueChanged do: block
Stef, maybe for a quick test and see if the situation changes because of it, you can change that to whenChangedDo: aBlock | block subscription | block := [:announcement :ann | aBlock cull: announcement newValue cull: announcement oldValue cull: announcement cull: ann. *subscription subscriber removeSubscription: subscription* ]. *subscription := *announcer when: ValueChanged do: block. modulo error handling :)
can also be part of the cause of some of our problems.
There are 146 senders and many of them could just be replaced by whenChanged:send:to: and whenChanged:send:to:with:
Finally we were discussing with igor about the general API of spec model: We are thinking that the following patterns are bloating the interface for an not obvious gain.
whenWindowChanged: aBlock
window whenChangedDo: aBlock
whenShortcutsChanged: aBlock <api: #event> "Set a block to value when the shortcuts block has changed"
additionalKeyBindings whenChangedDo: aBlock