Skip to content

Instantly share code, notes, and snippets.

@ennis
Created May 7, 2018 16:07
Show Gist options
  • Save ennis/2a6e62c862304f3f378cb13880ae7df8 to your computer and use it in GitHub Desktop.
Save ennis/2a6e62c862304f3f378cb13880ae7df8 to your computer and use it in GitHub Desktop.
Yoga-rs segfault on drop
extern crate yoga;
fn main() {
let mut children = Vec::new();
let mut root = yoga::Node::new();
for i in 0..1000 {
let mut c = yoga::Node::new();
root.insert_child(&mut c, 0);
children.push(c);
}
// destruction happens here: first root, then children
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment