diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-06-17 23:18:20 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-06-17 23:18:20 -0700 |
| commit | 9ef4c413a869b4fc1e5df3f79f484b2ffd46cda0 (patch) | |
| tree | 3886fd7db31c56542604489666250758f6c789a3 /src/libstd/rt/mod.rs | |
| parent | 3281f5b63792a57d2cea6e93446e63f44e1e3ea0 (diff) | |
| download | rust-9ef4c413a869b4fc1e5df3f79f484b2ffd46cda0.tar.gz rust-9ef4c413a869b4fc1e5df3f79f484b2ffd46cda0.zip | |
std::rt: Check exchange count on exit
Diffstat (limited to 'src/libstd/rt/mod.rs')
| -rw-r--r-- | src/libstd/rt/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 10b5c78f99e..0a269aa8767 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -176,6 +176,8 @@ pub fn start(_argc: int, _argv: **u8, crate_map: *u8, main: ~fn()) -> int { sched.enqueue_task(main_task); sched.run(); + cleanup(); + return 0; } @@ -185,6 +187,10 @@ pub fn init(crate_map: *u8) { logging::init(crate_map); } +pub fn cleanup() { + global_heap::cleanup(); +} + /// Possible contexts in which Rust code may be executing. /// Different runtime services are available depending on context. /// Mostly used for determining if we're using the new scheduler |
