Created
September 8, 2013 12:52
-
-
Save enomado/6484503 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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