How to implement resonable process timeout

Is this related to Memory Leak on Windows? ?