I left my program open for 9 hours and it used up 700mb of ram, could someone review it?

FG via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 27 17:22:10 PST 2015


On 2015-01-27 at 23:39, Gan wrote:
> I commented out some stuff and it appears my massive memory consumption comes from my tile.redraw function:
> ...
> Would you know why this is using hundreds of mb of rams?

Looks OK, so probably it is not the cause by itself.
I would add a piece of code to SpaceBackground.draw that for every few calls to this function would print out tiles.length and stack.length to the console. Just to make sure that those arrays don't grow out of control, before accusing anything else.


More information about the Digitalmars-d-learn mailing list