Workspaces wasting memory

John-Reed Maffeo (rlpa80) rlpa80 at
Tue May 26 15:25:34 UTC 1998

Andreas Raab wrote:
> >
> > Hi.
> >
> > I think I have the workspace memory wasting problem again (my image file
> > grew a couple of megabytes for no reason). What can I do to check? I tried self
> > inspect over a workspace (from the menu), this led me to a stringHolder,
> > which has a model which is a workspace. But inspecting a workspace leads to a
> > huge byteArray... where are the local names in a workspace?
> The Workspace includes a dictionary with the bindings. All your undeclared
> stuff can be found there. Try adding
> Workspace>>releaseBindings
>   bindings _ nil
> and then:
> Workspace allInstancesDo:[:workSpace| workSpace releaseBindings].
> Smalltalk garbageCollect.
> This should give you most of the space back (given that it's really the
> workspace bindings ;-)

To reclaim image space open the System Transcript from the open menu (the same
one you
use to open browsers). The System Transcript has been loaded with lots of
helpful bits
of code. There are several that have to do with image space management. They
are listed
under the heading HouseCleaning.

Undeclared inspect.
Smalltalk cleanOutUndeclared.
(Object classPool at: #DependentsFields) inspect.
Smalltalk reclaimDependents.
Symbol rehash.
Transcript clear.
Smalltalk forgetDoIts.

I use these a lot because I am hacking at porting code and I don't have much
of a clue
as to what I am doing. 


>   Andreas

More information about the Squeak-dev mailing list