[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Memory leaks - how to find them?

From: Bonzini
Subject: Re: [Help-smalltalk] Memory leaks - how to find them?
Date: Fri, 30 May 2003 10:16:26 +0200

> It only went down to 4MB and stayed there. Pity. But I can't guarantee
> that there were no nasty references that should have been cleared up.
> That image was fairly well messed up.

You can use the code in examples/ (you'll have to uncomment a couple 
lines) to obtain a list of classes with the number of instances, and spot 

> Files in on top of 'Browser' and 'Regex' (the latter is only used
> briefly).

Sorry, this is not something that will go in.  It is too hackish, and too little
customizable.  But I can provide the machinery to do it nicely in the first 
alpha for
2.2: the trick is to generalize the <primitive: NNN> syntax so that one can say

    <saveProperty: #xGeom>

or even provide a custom block like

    <saveProperty: #xGeom as: [ :widget :value | value / widget weight ]>

(just an example, it probably does not make sense :-)

All these will be compiled to a Message object and accessible with
CompiledMethod>>#pragmasDo: or CompiledMethod>>#allPragmas:

You will then have to patch Blox in a thousand places but it is quite a 
mechanical work
(like I did when I added the documentation to all of the Blox options).

It is good work, you'll get many insights by going down your current way (maybe 
for BCanvasObject -- this is something for which your automatic approach will 
have to
be changed.

> BLOX.BWindow savePositions "Haven't managed to make this automatic yet"

Take a look at ObjectMemory's dependents.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]