|
7496 | 7496 | \indextext{program!termination|(}% |
7497 | 7497 | \indextext{object!destructor static}% |
7498 | 7498 | \indextext{\idxcode{main} function!return from}% |
7499 | | -Constructed objects\iref{dcl.init} |
| 7499 | +Constructed complete objects\iref{dcl.init} |
7500 | 7500 | with static storage duration are destroyed |
7501 | 7501 | and functions registered with \tcode{std::atexit} |
7502 | 7502 | are called as part of a call to |
|
7510 | 7510 | \end{note} |
7511 | 7511 |
|
7512 | 7512 | \pnum |
7513 | | -Constructed objects with thread storage duration within a given thread |
| 7513 | +Constructed complete objects with thread storage duration within a given thread |
7514 | 7514 | are destroyed as a result of returning from the initial function of that thread and as a |
7515 | 7515 | result of that thread calling \tcode{std::exit}. |
7516 | | -The destruction of all constructed objects with thread storage |
7517 | | -duration within that thread strongly happens before destroying |
| 7516 | +The destruction of those constructed objects |
| 7517 | +is sequenced before releasing the storage for |
| 7518 | +any object with thread storage duration within that thread\iref{basic.stc.thread}. |
| 7519 | +The destruction of those constructed objects |
| 7520 | +strongly happens before destroying |
7518 | 7521 | any object with static storage duration. |
7519 | 7522 |
|
| 7523 | +\pnum |
| 7524 | +The destruction of a complete object with thread storage duration within a given thread |
| 7525 | +and having constant destruction\iref{expr.const} |
| 7526 | +is sequenced after the destruction of any other complete object |
| 7527 | +with thread storage duration within the thread. |
| 7528 | +The destruction of a complete object with static storage duration |
| 7529 | +and having constant destruction |
| 7530 | +is sequenced after the destruction of any other complete object |
| 7531 | +with static storage duration |
| 7532 | +and after any call to a function passed to \tcode{std::atexit}. |
| 7533 | +The sequencing rules in the remainder of this subclause |
| 7534 | +apply only to complete objects not having constant destruction. |
| 7535 | + |
7520 | 7536 | \pnum |
7521 | 7537 | If the completion of the constructor or dynamic initialization of an object with static |
7522 | 7538 | storage duration strongly happens before that of another, the completion of the destructor |
|
0 commit comments