On May 25, 2013, at 2:43 PM, Igor Stasenko <siguc...@gmail.com> wrote:
> On 25 May 2013 14:01, stephane ducasse <stephane.duca...@free.fr> wrote: >> 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. >> > is it held only by announcer or something else? no nothing else. Stef > >> Stef >> >> >> On May 25, 2013, at 1:55 PM, Igor Stasenko <siguc...@gmail.com> wrote: >> >>> On 25 May 2013 13:49, Stéphane Ducasse <stephane.duca...@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. >>> >> >> > > > > -- > Best regards, > Igor Stasenko. >