Mercurial > projects > ddmd
diff dmd/SwitchStatement.d @ 178:e3afd1303184
Many small bugs fixed
Made all classes derive from TObject to detect memory leaks (functionality is disabled for now)
Began work on overriding backend memory allocations (to avoid memory leaks)
author | korDen |
---|---|
date | Sun, 17 Oct 2010 07:42:00 +0400 |
parents | af724d3510d7 |
children | 0622fff7810a |
line wrap: on
line diff
--- a/dmd/SwitchStatement.d Sun Oct 10 10:38:55 2010 +0400 +++ b/dmd/SwitchStatement.d Sun Oct 17 07:42:00 2010 +0400 @@ -69,6 +69,7 @@ this(Loc loc, Expression c, Statement b, bool isFinal) { + register(); super(loc); this.condition = c; @@ -486,7 +487,7 @@ block_next(blx,BCswitch,null); // Corresponding free is in block_free - targ_llong* pu = cast(targ_llong*) malloc(targ_llong.sizeof * (numcases + 1)); + targ_llong* pu = cast(targ_llong*) GC.malloc(targ_llong.sizeof * (numcases + 1)); mystate.switchBlock.Bswitch = pu; /* First pair is the number of cases, and the default block */