Open gftea opened 2 years ago
it says below in https://github.com/rust-lang/nomicon/blob/master/src/leaking.md
all that does is leak even more (and possibly leave the Vec in an unexpected but otherwise consistent state).
As I understand, the remaining items in vec is leaked due to mem::forget(drainer), What is leaked even more in the example?
vec
mem::forget(drainer)
it says below in https://github.com/rust-lang/nomicon/blob/master/src/leaking.md
As I understand, the remaining items in
vec
is leaked due tomem::forget(drainer)
, What is leaked even more in the example?