
Jan. 3, 2003
1:21 p.m.
[Greg Ward]
As I recall (and this knowledge dates back to 1997 or so, so could well be obsolete), Perl does a full GC run at process exit time. In normal contexts this is irrelevant; I believe the justification was to clean up resources used by an embedded interpreter.
See http://tinyurl.com/41wy searching down for "Two-Phased Garbage Collection". Perl's mark-&-sweep phase runs when a thread terminates, which includes the main thread exiting, but isn't really aimed at that.