Why is my Windows Forms application consuming more and more memory when it\'s a blank app and not even being used by the user (me)?
You may be able to reproduce with the
The GC is not collecting unused memory, since it's is very small.
You can try forcing the GC collect (not a good practice, just for testing)
public Form1()
{
InitializeComponent();
_timer.Interval = 10000;
_timer.Tick += _timer_Tick;
_timer.Start();
}
void _timer_Tick(object sender, EventArgs e)
{
GC.Collect();
}
After this the memory stays at 3.2 MB at my PC :)