Dechenjm / crack-language

Automatically exported from code.google.com/p/crack-language
Other
0 stars 0 forks source link

leaking memory during object initialization #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

class Foo {
  // if bar is not default null, it seems to be leaked during initialization
  Object bar;
}

n := 100000000;
i := 0;
Foo foo = null;

while (i++ <= n)
  foo = Foo();

----------

Object bar appears to be initialized but never freed for each iteration, and 
quickly consumes all available memory.

Original issue reported on code.google.com by weyrick on 26 Oct 2010 at 7:24

GoogleCodeExporter commented 9 years ago
Fixed in rev 8b43ed92023d (it's difficult to create a usable regression test 
for this)

Original comment by mind...@gmail.com on 26 Oct 2010 at 11:21