in reply to Kill and free the memory Never ending threads from main

When you terminate the process, your operating system will clean up all the other threads for you.

To quote perlthrtut:

An action that terminates a process will terminate all running threads. die() and exit() have this property, and perl does an exit when the main thread exits, perhaps implicitly by falling off the end of your code, even if that's not what you want.

The rest of that section might also be relevant for you.

  • Comment on Re: Kill and free the memory Never ending threads from main