in reply to Why bother with the mark and sweep garbage collection on non-embedded interpreter shutdown?
But for a normal perl program, let's say a simple non-interactive script running from the command line as a seperate process, what benefit is there from doing exhaustive and time-consuming garbage collection just before exiting and after all productive work is done? When a process exits, ALL the memory is released back to the kernel - interpreter memory, program-space memory - all of it. Circular references or not. Isn't this last minute gc just a big waste of time for the cases (outside of persistent runtime environments) where any garbage would be collected?
Lots of reasons :-)
|
|---|