[Squeakland] duplicate (not sibling) - garbage collection?

Mark Nelson prof.mark.nelson at gmail.com
Fri Feb 15 08:48:51 PST 2008

Hi Scott,

Recently you gave me a useful tip for creating duplicates (not
siblings) from a textual script using "costume duplicate player". This
has been working great except for one problem.  As students are
developing their scripts, their project files keep growing rapidly in
size. We start off with a 'template' project that is about 300 kB.
Each round of program development and debugging usually involves
creating and destroying multiple 'duplicates' using the above method.
Before long, the project files are many MB in size, even after all
players have been cleared from the playfield and the trashcan has been
emptied.  Loading and saving project files gets slower and slower.

I've discovered this happens even if the duplicates are created using
the halo icon, rather than the textual script. Each duplicate that is
ever created seems to leave a 'ghost' that take up about 130 kB of
storage.  In the process of debugging their scripts, students
typically create and destroy dozens of 'duplicates', leading to
multi-MB file sizes.  This growth in file size seems to happen only
with 'duplicates', not with 'siblings'.

Is there some way to do garbage collection to get rid of these
'ghosts' so we can keep the file sizes manageable?


More information about the Squeakland mailing list