Memory leaks with Spec?
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. Stef
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.
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.
On May 25, 2013, at 1:59 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
I am pretty sure to only use weak registration (why aren't all the registration weak btw ??)
It may be a problem somewhere else :(
Yes I'm trying to understand.
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.
Le 25/05/2013 13:59, Benjamin a écrit :
I am pretty sure to only use weak registration (why aren't all the registration weak btw ??)
It may be a problem somewhere else :(
I hit that problem a while ago. I couldn't find where it was holding the instances, even with the help of the strong pointer inspector :( (and trying to put everything weak, and doing unregister when closing windows, and...) The same code under plain Morphic has no memory leak. The only suspicion I had was looking at announcers on blocks... Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
we found the problem. It is not spec but the EyeInspector polling update. So we should find a solution. Probably it should register WindowClosed and kill the process. Stef
Le 25/05/2013 13:59, Benjamin a écrit :
I am pretty sure to only use weak registration (why aren't all the registration weak btw ??)
It may be a problem somewhere else :(
I hit that problem a while ago. I couldn't find where it was holding the instances, even with the help of the strong pointer inspector :( (and trying to put everything weak, and doing unregister when closing windows, and...)
The same code under plain Morphic has no memory leak.
The only suspicion I had was looking at announcers on blocks...
Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
2013/5/27 stephane ducasse <stephane.ducasse@free.fr>
we found the problem. It is not spec but the EyeInspector polling update. So we should find a solution. Probably it should register WindowClosed and kill the process.
Actually the inspector is already registered on WindowClosed event. This bug was introduced by a recent update on spec/EyeInspector. There is a slice in inbox (put this morning) to revert the change that creates this bug.
Stef
Le 25/05/2013 13:59, Benjamin a écrit :
I am pretty sure to only use weak registration (why aren't all the registration weak btw ??)
It may be a problem somewhere else :(
I hit that problem a while ago. I couldn't find where it was holding the instances, even with the help of the strong pointer inspector :( (and trying to put everything weak, and doing unregister when closing windows, and...)
The same code under plain Morphic has no memory leak.
The only suspicion I had was looking at announcers on blocks...
Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
-- Clément Béra Mate Virtual Machine Engineer Bâtiment B 40, avenue Halley 59650 *Villeneuve d'Ascq*
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 <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.
On 25 May 2013 14:01, stephane ducasse <stephane.ducasse@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?
Stef
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.
-- Best regards, Igor Stasenko.
On May 25, 2013, at 2:43 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 25 May 2013 14:01, stephane ducasse <stephane.ducasse@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 <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.
-- Best regards, Igor Stasenko.
stephane ducasse 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
Yes!!! From http://forum.world.st/Unsubscribing-for-Announcements-tp3220751p4083086.html :
So it sounds like weak is the vast majority, so maybe have "announcer on:..." which gives you weak subscriptions and "announcer strong on:..." following "Make common things easy, rare things possible"
----- Cheers, Sean -- View this message in context: http://forum.world.st/Pharo-dev-Memory-leaks-with-Spec-tp4689839p4689852.htm... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Sean P. DeNigris wrote
Yes!!! From http://forum.world.st/Unsubscribing-for-Announcements-tp3220751p4083086.html :
But IIRC ephemerons are needed for subscribing blocks that way... ----- Cheers, Sean -- View this message in context: http://forum.world.st/Pharo-dev-Memory-leaks-with-Spec-tp4689839p4689854.htm... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Sean P. DeNigris wrote
stephane ducasse wrote
Igor I will use weak (may be weak should be default and we should propose strong as an option) Yes!!! From http://forum.world.st/Unsubscribing-for-Announcements-tp3220751p4083086.html :
Issue 10787: Make Announcements Weak By Default https://pharo.fogbugz.com/f/cases/10787/Make-Announcements-Weak-By-Default Blocked on Issue 4312: Ephemerons integration ----- Cheers, Sean -- View this message in context: http://forum.world.st/Pharo-dev-Memory-leaks-with-Spec-tp4689839p4690513.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (7)
-
Benjamin -
Clément Bera -
Goubier Thierry -
Igor Stasenko -
Sean P. DeNigris -
stephane ducasse -
Stéphane Ducasse