I am pretty sure to only use weak registration (why aren't all the registration weak btw ??) It may be a problem somewhere else :( Ben On May 25, 2013, at 1:55 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 25 May 2013 13:49, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
this is strange I cannot get rid of Spec based ui instances. I tried many
LoggerUI allInstances do: [ :each | SystemAnnouncer uniqueInstance unsubscribe: each ]
LoggerUI allInstances do: #delete.
Smalltalk garbageCollect
Nothing changes. Each time I create and close it does not get garbage collected. I remove all the announcement registration from my code but nothing changes.
That's why it is preferable to always use weak subscriptions:
announcer weak on: Foo send: #bar to: theGuyWhoWillBeHeldWeakly
then: 1. you don't have to unsubscribe 2. even if you still have memory leaks, you can exclude announcer from equation
Stef
-- Best regards, Igor Stasenko.