rt: Free all outstanding boxes at task death

This commit is contained in:
Brian Anderson
2012-03-23 17:51:54 -07:00
parent 106c9faa59
commit 3a7a408386
3 changed files with 21 additions and 0 deletions

View File

@@ -87,12 +87,17 @@ struct cleanup_args {
bool threw_exception;
};
void
annihilate_boxes(rust_task *task);
void
cleanup_task(cleanup_args *args) {
spawn_args *a = args->spargs;
bool threw_exception = args->threw_exception;
rust_task *task = a->task;
cc::do_cc(task);
annihilate_boxes(task);
cc::do_final_cc(task);
task->die();