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?
std::thread
CloseHandle
native_handle
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 .
, RAII, . , :
.
http://www.cplusplus.com/reference/thread/thread/thread/
Source: https://habr.com/ru/post/1651167/More articles:IIS 8 WebSockets with Resolution - .netCan a conditional operator generate a type of cv-qualified, array or function when using a cv-unqualified type of objects without an array on two x values? - c ++Enter the service in another service - javaΠΠΎΡΠ΅ΠΌΡ ΡΡΠ½ΠΊΡΠΈΠΈ js ΡΠ΅ΡΠΏΡΡ Π½Π΅ΡΠ΄Π°ΡΡ, ΠΊΠΎΠ³Π΄Π° Ρ Π½Π°Π·Π½Π°ΡΠ°Ρ ΠΈΡ Π»ΠΎΠΊΠ°Π»ΡΠ½ΠΎΠΉ ΠΏΠ΅ΡΠ΅ΠΌΠ΅Π½Π½ΠΎΠΉ? - clojurescriptThread exchange counter between threads Jmeter - javaApply the function to two vectors of different lengths and return the matrix to R - stringConvert list items to binary - pythonΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Spark 2.0.0 Π½Π΅ ΠΎΡΡΠ°Π½Π°Π²Π»ΠΈΠ²Π°Π΅ΡΡΡ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ ΠΏΡΠΈ Π²ΠΎΠ·Π½ΠΈΠΊΠ½ΠΎΠ²Π΅Π½ΠΈΠΈ ΠΈΡΠΊΠ»ΡΡΠ΅Π½ΠΈΡ Π½Π° ΠΌΠΎΠ΄Π΅Π»ΠΈ Π½ΠΈΡΠΈ-ΠΊΠ»ΠΈΠ΅Π½ΡΠ° - yarnWhy does using the AND operator work with JOIN, even without a WHERE clause? - joinOutputting empty lines between grep results when working with -C (or -B / -A) - linuxAll Articles