I have a class Class
in which there's a member property HANDLE handle
to a thread (We can assume it is set to NULL
at that point) . at some point , a method within Class
dispatches one of it's own methods Class::threaded()
(using another function that is external to the class itself, but it doesn't really matter here) with CreateThread()
. The calling thread will then may continue to other function outside of Class
.
As CloseHandle()
must be called for the HANDLE
returned from CreateThread()
, I was wondering if calling it from Class::threaded()
just before it returns would be a decent solution.