My guess would then be: when updating the list of packages, the selected morph isn't removed from selectedMorphs, however the tree view is rebuilt [*] by recreating all models and all morphs inside, with reselection of the current package (which sees a newly created morph selected and added to selectedMorphs).
[*] Yes, on average, what is done when a tree is updated is : destroy all morphs inside the tree view, and all models as well, and recreates everything. Now, why on AltBrowser tree view I haven't seen the issue: single selection versus multiple selection? Or because I have some code to do partial tree updates? We're lacking a nice tree object model for GUI use. I'll try to write a test case tracking this. Thierry ________________________________________ De : Pharo-dev [pharo-dev-boun...@lists.pharo.org] de la part de Johan Brichau [jo...@inceptive.be] Envoyé : dimanche 29 juin 2014 22:31 À : Pharo Development List Objet : Re: [Pharo-dev] Nautilus memory leak/hog crashing Pharo On 27 Jun 2014, at 14:00, Goubier Thierry <thierry.goub...@cea.fr> wrote: > It seems to depend on the Nautilus window state. If you've just opened it, > then nothing seems to be amiss. If you start to select things in it, you > start to see time spent in updateClassView, but why? I just found that the instances are being kept by the MorphTreeListManager#selectedMorphs instvar. So, that observation is correct: you need to have a package selected. What seems to happen is that on every package load, the Nautilus package tree is updated (which means a PackageTreePackageNodeModel is created for each package in the image via #asNautilusNodeWithModel:). This update does not clear the selectedMorphs list and just this single reference seem to keep the entire package tree model and its Morphs in memory. There were 496 morphs in the selectedMorphs list and when I cleaned that, all trailing Morphs and PackageNodeModelNodes (and all the other garbage) could be gc'ed. On to investigating the growth of the selectedMorphs variable... Johan