graydon/rust — Issue #1480: Leak with sendfn
Author: jruderman
Created: 2012-01-10 04:55:34+00:00
State: open

This leaks:

tag maybe_pointy {
none;
p(@pointy);
}

type pointy = {
mutable a : maybe_pointy,
d : sendfn()->(),
};

fn empty_pointy() -> @pointy {
ret @{
mutable a : none,
d : sendfn()->(){},
}
}

fn main()
{
let v = empty_pointy();
v.a = p(v);
}