Seems that sometimes values are never dropped? What exactly are the drop semantics?
use crossbeam_skiplist::SkipMap;
fn main() {
let map = SkipMap::new();
for i in 0..200 {
map.insert(i, LoudDrop(i));
}
for i in 0..200 {
drop(map.remove(&i));
}
map.clear();
}
struct LoudDrop(u32);
impl Drop for LoudDrop {
fn drop(&mut self) {
println!("DROPPED! {}", self.0);
}
}
Seems that sometimes values are never dropped? What exactly are the drop semantics?
Output:
And nothing more