Fix. some memory leaks and bugs in process module.
Fix. pass handles to loop walk.
Update doc.