> But what if a process exists in a faulty way. Perhaps some PHP code > that exists abnormally?
If the process exits, you've got no worries about memory. If a thread hangs [indefinitely], before you can free memory, the memory is probably the least of your problems.