How do I delete projects?

Ned Konz ned at bike-nomad.com
Thu Mar 8 23:29:36 UTC 2001


On Thursday 08 March 2001 10:28, Bob Arning wrote:
> Ned,
>
> There is not a good UI for this at the mement. The current code errs on the
> side of safety trying to ensure we don't inadvertantly have a project
> garbage collected. The first thing I would try is
>
> 	Project rebuildAllProjects.
>
> at some point that there are no inspectors, explorers or the like open and
> referring to projects. This may be sufficient, but if not, then you might
> do
>
> 	Project forget: aParticularProject.
>
> where <aParticularProject> is a project you suspect might be the root
> holding the rest in memory. Then go back to the first example.
>
> Let me know how this works.

It took more than this (my Workspace is attached). There were a number of 
pointers to the projects.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com
-------------- next part --------------
"print it" Project allInstances collect: [ :ea | ea name ].

baddies _ #('<no name -- garbage?>' 'Heros' 'Messages To The Future' 'Private Universe' 'Goldfish Bowl' 'We Are Easily Fooled' 'Montesorri' 'Flex Machine' 'Papert' 'Dynadream' 'ACM1 Talk').

Smalltalk garbageCollect 

bad _ (Project allInstances select: [ :ea | baddies includes: ea name ]).
bad do: [ :ea | Project forget: ea.
		ProjectHistory forget: ea.
		ea setParent: nil.
		ea release ].

(Project allInstances select: [ :ea | bad anySatisfy: [ :b | ea pointsTo: b ] ])
	do: [ :ea | ea setParent: Project topProject ].
 
(InternalThreadNavigationMorph allInstances select: [ :ea | bad anySatisfy: [ :b | ea pointsTo: b ] ])
	do: [ :ea | ea instVarAt: 11 put: nil ].
bad _ nil.

Project rebuildAllProjects.

"print it" Project allProjects


More information about the Squeak-dev mailing list