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


in reply to Do threads do global destruction?

Each thread has its PL_perl_destruct_level variable set to 2; this is the internal equivalent of the PERL_DESTRUCT_LEVEL environment variable. The net effect is that when the thread is being freed after joining, all data structures associated with that thread are freed (modulo bugs).

Dave.