To drop a value is to run its clean-up code, its Drop implementation if it has one, then to drop its fields, and finally to free its memory. The compiler inserts the drops, at the end of the owner’s scope, in the reverse order of declaration; drop(x) drops x earlier.
书籍暂未推出简体中文版——当前显示英文版。
Computer Science · 术语表
什么是 Drop?
又称: drop (Rust)