Skip to content

Task cleanup code needs to know more about closure env to clean it up #846

Description

@marijnh

This program currently leaks because the function env containing a pointer is freed simply with free, without iterating over its contents.

Which also raises the question of whether migrate_alloc should recursively migrate all sub-allocs.

use std;

fn x(_f: [int]) {}
fn main() {
    std::task::spawn(bind x([1, 2, 3, 4, 5]));
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions