Struct rust_examples::memory::DoubleFeeTest [−][src]
pub struct DoubleFeeTest;Expand description
This test shows that in safe Rust one cannot compile a code that would result in double free.
Example
ⓘ
struct Data;
let data = Data;
drop(data); // Free the memory once
drop(data); // Free the memory again