Igor I will use weak (may be weak should be default and we should propose strong as an option) but I do not understand since
>> LoggerUI allInstances do: [ :each | >> SystemAnnouncer uniqueInstance unsubscribe: each ] should unregister everything. Stef On May 25, 2013, at 1:55 PM, Igor Stasenko <[email protected]> wrote: > On 25 May 2013 13:49, Stéphane Ducasse <[email protected]> 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. >
