process_line() waits for the end of process
free memory