Etoy: lots of 'garbage' costumes?

Ned Konz ned at bike-nomad.com
Wed Nov 13 23:12:56 UTC 2002


On Wednesday 13 November 2002 02:20 pm, Marcel Weiher wrote:
> Hi folks,
>
> in the "Scripting with Squeak" Seminar we're giving, Markus and I
> have encountered a problem with Projects becoming difficult to save
> because of memory issues.
>
> A little snooping revealed that the problem was with
> Morphs/Etoys/Players that were being animated by changing their
> costume using scripting tiles (the  "... look like Holder's
> playerAtCursor / increment Holder's cursor" pattern).  These seem
> to accumulate all the customes they've ever had in the "costumes"
> instance variable of their "player".
>
> Since our students tend to leave their animations running in the
> background while they work on other stuff, that adds up to a LOT of
> customes.
>
> Is this the intended behavior?  Can I turn it off somewhere?
>
> I have a small snippet of code to zap all of these costumes.  Is
> this safe or will I destroy something important?

It looks like:

	World abandonCostumeHistory.

would clean these out. Does that work (i.e. can you still load the 
projects and do the animations)?

Are SketchMorphs with identical forms being saved in costumes? If so, 
then Player>>knownSketchCostumeWithSameFormAs: isn't working right.

Otherwise, costumes should just contain SketchMorphs with unique 
forms. Which should be shared (i.e. only one copy of them should be 
saved) by all the Morphs using them (if I'm reading the code right).

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list