struct CustomSmartPointer {
    data: String,
}

impl Drop for CustomSmartPointer {
    fn drop(&mut self) {
        println!("Porzucanie CustomSmartPointer z danymi `{}`!", self.data);
    }
}

fn main() {
    let c = CustomSmartPointer {
        data: String::from("moje rzeczy"),
    };
    let d = CustomSmartPointer {
        data: String::from("inne rzeczy"),
    };
    println!("Utworzono CustomSmartPointer.");
}
