Is there an easy way to close multiple descriptors?
Is there a way to close multiple handles for threads in C ++ without closing them separately? I have multiple threads with handles that I have stored in an array so I can use WaitForMultipleObjects()
before closing them. I know what I could call CloseHandle
for each array descriptor (either for a loop or one at a time), but I was wondering if there was an easy way to close them all. For example, perhaps running CloseHandle
on the array itself (if that would work)? Or is there a method along the lines CloseMultipleHandles()
? Thanks in advance.
+3
source to share