Skip to content

Instantly share code, notes, and snippets.

@enomado
Created September 8, 2013 12:52
Show Gist options
  • Save enomado/6484503 to your computer and use it in GitHub Desktop.
Save enomado/6484503 to your computer and use it in GitHub Desktop.
struct Yoba {
value: uint
}
impl Yoba {
fn new(value: uint) -> Yoba {
Yoba { value: value }
}
}
impl Drop for Yoba {
fn drop(&self) {
println("dropped");
}
}
fn main() {
{
let r1 = Yoba::new(1);
let r2 = Yoba::new(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment