Creating a tuple of a parameterized string leaks memory

afd5402
Opened by Patrick Walton at 2011-01-27 01:25:21

Test case:

fn f[T](T x) -> tup(T) {
  ret tup(x);
}

fn main() -> () {
  f("foo");
}

Result:

[pwalton@host-4-84 ~/Source/rust/src] ./bug 
allocation 0x600000 was not freed
rt: fatal, 'leaked memory in rust main loop (1 objects)' failed, rt/memory_region.cpp:99 1 objects
  1. Fixed long ago (if you switch to passing the arg by &)

    Graydon Hoare at 2011-01-27 01:25:21