[][src]Function ndless::process::exit

pub fn exit(code: i32) -> !

WARNING

This will leak memory without careful planning, as it does not run any destructors! You need to make sure that all scopes end before calling this! You can either use

fn main() {
    {
        // Main code
        let a = vec![5];
    }
    ndless::process::exit(1);
}

or

fn main() {
    ndless::process::exit({
        // Main code
        let a = vec![5];
        0
    });
}

to ensure that no memory leaks.