How does Rust know whether to run the destructor during stack unwind?

后端 未结 3 1076
轻奢々
轻奢々 2020-12-17 10:03

The documentation for mem::uninitialized points out why it is dangerous/unsafe to use that function: calling drop on uninitialized memory is undefined behavior.

3条回答
提交回复
热议问题