void timer_Tick(object sender, EventArgs e) { timer.Enabled = false; try { UnloadUnusedLines(); } finally { timer.Enabled = true; } }