> On 24 Mar 2015, at 16:56, Sven Van Caekenberghe <s...@stfx.eu> wrote: > > >> On 24 Mar 2015, at 16:50, Andrei Chis <chisvasileand...@gmail.com> wrote: >> >> There are lot of spotter objects that do not get garbaged collected >> >> GTSpotter allInstances size --> 29 in my image > > I got 10 now. > > But can they cause megabytes to be locked up ?
If they work like Nautilus then there’s a huge tree attached to every one, with morphs, weak references, contexts… I think there was (and maybe there still is) a problem with detection of circular dependencies and weak references. If you register actions in the EventManager (or whatever it’s called now) make sure that they are cleared. Then, there used to be a class variable somewhere that held on to the single instance of some kind of work space factory (or some such thing) which strongly holds on to stuff and prevents garbage collection. I don’t know what has been cleaned by now but there’s a lot of potential for such things… I had to write some code a while ago to get rid of window instances that wouldn’t be garbage collected. I’ve attached the file outs, maybe someone can use them (they are for Pharo 1.3 though, so maybe not of too much use…) Cheers, Max
NSSettings class-cleanupEvents.st
Description: Binary data
NSSettings class-cleanupSystemWindows.st
Description: Binary data
NSSettings class-cleanupWindows.st
Description: Binary data
NSSettings class-cleanupWorkspaces.st
Description: Binary data
> >> On Tue, Mar 24, 2015 at 4:16 PM, Tudor Girba <tu...@tudorgirba.com> wrote: >> Yes, there are clearly objects lying around. I suspect it has to do with >> Playground or Inspector, but I am not sure. >> >> Doru >> >> On Tue, Mar 24, 2015 at 4:13 PM, Max Leske <maxle...@gmail.com> wrote: >> >>> On 24 Mar 2015, at 15:18, Sven Van Caekenberghe <s...@stfx.eu> wrote: >>> >>> Hi, >>> >>> There seems to be some kind of memory leak in recent Pharo 4.0 images. >>> Image size (as saved on disk) seems to be growing very rapidly under normal >>> use (development with Nautilus, Spotter, GTPlayground, GTInspector and >>> Monticello, debugging). Numbers go from the initial 20Mb to 100s of Mb and >>> they seem to increase constantly, over a period of days. >> >> Are you saying that the static image size is growing? Dynamic growth could >> easily be explained by leaks in NativeBoost for instance. But static image >> size means that there are objects lying around that shouldn’t (at least that >> should be easier to debug). >> >>> >>> One way to look at memory use is with >>> >>> SpaceTally printSpaceAnalysis >>> >>> but that takes a while. >>> >>> Please help us find and fix this issue. >>> >>> Thanks, >>> >>> Sven >>> >>> >> >> >> >> >> >> -- >> www.tudorgirba.com >> >> "Every thing has its own flow" >> > >