Skip to content

Question: will a global unique_ptr be released on exit? #21658

Answered by sbc100
ericoporto asked this question in Q&A
Discussion options

You must be logged in to vote

You can use -sEXIT_RUNTIME=1 if you want to get the normal exit behaviour where descructors run like they would on your native OS.

You shouldn't need to use any kind of smart pointer. Normal object destructors (or atexit callbacks) should work fine.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ericoporto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants