Drop Check
摘要
This chapter focuses on one of Rust’s most distinctive features related to memory management (i.e., the drop check mechanism). The chapter begins by exploring the Drop trait, which defines how and when values are automatically cleaned up when they go out of scope. From there, the chapter moves into the drop check process, a compile-time analysis that ensures resources are not used after being moved or dropped, thus preventing subtle memory safety issues.