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

Re: garbage collection

> it appears that I have a huge amount of garbage in my old image.
> How does something qualify for garbage collection? I had assumed that if it
> couldn't be reached from the lobby it would be garbage collected.

Objects may be reachable from places other than the lobby: old
processes, the history table, some caches in the UI or the
transporter, etc.  (If Self had "weak pointers", many of these
problems would go away.)

To release all these "hidden" references, run "memory releaseObjects";
"memory cleanup" does a release followed by a GC.  Be warned that
releaseObjects flushes the code cache (because compiled code may hold
on to objects as well).

So, if you run memory cleanup right after starting from a snapshot,
you should be able to get rid of your garbage.  IF not, you may have
introduced your own "hidden" references that hold on to old objects
(suspects are e.g. variables in shell, or other "convenience slots"
you use while debugging.