Just a quick question, if a 2-threaded application has a global variable, does it go out of scope when the primary thread ends, or does it go out of scope after all the threads in the process end?
Just a quick question, if a 2-threaded application has a global variable, does it go out of scope when the primary thread ends, or does it go out of scope after all the threads in the process end?
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
The process terminates as the main thread terminates. Thus, yes the global variable no long exists after the main thread has terminated.
Kuphryn
(just for confirmation) So they go out of scope even if there's other threads in the process still running?
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.