If successful, ShellExecute returns a handle.
Does this handle need to be closed, and if so, how?
According to the examples published by my Microsoft, we do not need to close this handle. But the ShellExecute document itself is not negotiable. Can you confirm that we really do not need to close this handle?
But then, how can the descriptor be valid and does not need to be closed ??? Which of the following statements is true:
- the descriptor is invalid and we cannot do anything with it;
- the descriptor is never freed and there is (Microsoft memory leak) a memory leak (until the callerβs program ends);
- the handle is automatically freed by the system for some time and is never reused (-> another type of resource leak). Only when we try to use it can we know if it all points to something.
- what else?
source share