Close Handle

if one forget to call Close Handle - will there be any memory leak?

E

Expert

Verified

Well, yes & no. It is possible for a process to leak resources (such as kernel objects) whereas the process runs. Though, while the process terminates, the operating system make sure that any and all resources employed by the process are freed—it is guaranteed. For kernel objects, the system carry out the following actions: While your process terminates, the system scans automatically the process’s handle table. If the table contain any valid entries (objects which you didn’t close before terminating), the system closes these object handles for you. If the usage count of any of these objects goes to zero, the kernel destroys the object.

 

   Related Questions in Science

©TutorsGlobe All rights reserved 2022-2023.