I\'m using WPF to develop a simulator of Conway\'s Game of Life.
From some reason, sometimes the program takes up to 400,000K memory (When I draw a lot of cells real
This is the result of using a DrawingContext/DrawingVisual. It's actually benign and should all be garbage collected as the system needs it, but the memory usage can be alarming. If you were to, instead, draw shapes on a canvas then you would probably not see this problem. I've run into this same issue with custom drawn controls in the past. Switching to more vector-based drawing techniques (i.e., shapes on a canvas) fixed the memory consumption problem.