http://www.perlmonks.org?node_id=1014173


in reply to Timing of garbage collection

In "Intermediate Perl 2nd Ed., p. 54", Randal Schwartz helps propagate the apparent myth that perl does not release memory back to the operating system:

Perl recycles the memory for the array only when all references (including the name of the array) go away. Here, Perl only reclaims memory when @skipper and all the references we created to it disappear. Such memory is available to Perl for other data later in this program invocation, and generally Perl doesn’t give it back to the operating system.