Using C ++ 11 std :: thread native_handle and do I need CloseHandle

I began to practice using C ++ 11 std::threads. Typically, with Win32, I need to call CloseHandlewhenever I have a stream descriptor. Should I still call CloseHandlewhen I use C ++ 11 native_handle? Also, if I don't use the C ++ 11 built-in descriptors, are the thread handles cleared correctly?

+4
source share
2 answers

Of course not.
Thread objects have a destructor that frees up any resources of a particular operating system that the object can receive.

, () ++ , ( ) , .

RAII - , , , -, , .

, , C- .

, , Win32 API. API .

+3

Source: https://habr.com/ru/post/1651167/


All Articles