public void StopAndClear() { internCache.Clear(); if (cacheCleanupTimer != null) { cacheCleanupTimer.Dispose(); } }
/// <summary> /// Stop stats collection /// </summary> public void Stop() { logger.Info(ErrorCode.PerfCounterStopping, "Stopping Windows perf counter stats collection"); if (timer != null) { timer.Dispose(); // Stop timer } timer = null; }
public void Dispose() { cpuCounterPF?.Dispose(); availableMemoryCounterPF?.Dispose(); timeInGCPF?.Dispose(); if (genSizesPF != null) { foreach (var item in genSizesPF) { item?.Dispose(); } } allocatedBytesPerSecPF?.Dispose(); promotedMemoryFromGen1PF?.Dispose(); numberOfInducedGCsPF?.Dispose(); largeObjectHeapSizePF?.Dispose(); promotedFinalizationMemoryFromGen0PF?.Dispose(); cpuUsageTimer?.Dispose(); }
/// <summary> /// Stop stats collection /// </summary> public void Stop() { if (logger.IsEnabled(LogLevel.Debug)) { logger.LogDebug((int)ErrorCode.PerfCounterStopping, "Stopping Windows perf counter stats collection"); } if (timer != null) { timer.Dispose(); // Stop timer } timer = null; }
internal void Stop() { running = false; if (longTurnTimer != null) { longTurnTimer.Dispose(); longTurnTimer = null; } WorkerPoolThread[] threads; lock (lockable) { threads = pool.ToArray <WorkerPoolThread>(); } foreach (WorkerPoolThread thread in threads) { thread.Stop(); } systemThread.Stop(); }
public void Stop() { iStack.EventProductAdded -= ProductAdded; iStack.EventUpnpAdded -= UpnpAdded; SafeTimer timer = null; lock (iLock) { iRunning = false; foreach (var device in iDeviceWatchers.Values) { device.Dispose(); } iDeviceWatchers.Clear(); iOpenDevices.Clear(); timer = iTimer; iTimer = null; } if (timer != null) { timer.Dispose(); } }
private void MetroLinkEnableCyclicExecution_Click(object sender, EventArgs e) { if (safeTimer != null && safeTimer.IsRunning) { LuaCancellationRequested = true; safeTimer?.Dispose(); this.LogPrint("Timer disabled"); NotifyUser("Timer is stopped", false, false); SetupTimerControls(false); } else { labelRequestTime.Visible = false; if (!info.IsInGame) { new TaskDialog("Error!", nameof(AxTools), "Player isn't logged in", TaskDialogButton.OK, TaskDialogIcon.Stop).Show(this); return; } if (!int.TryParse(metroTextBoxTimerInterval.Text, out luaConsoleSettings.TimerInterval) || luaConsoleSettings.TimerInterval < 50) { TaskDialog.Show("Incorrect input!", nameof(AxTools), "Interval must be a number more or equal 50", TaskDialogButton.OK, TaskDialogIcon.Warning); return; } if (textBoxLuaCode.Text.Trim().Length == 0) { new TaskDialog("Error!", nameof(AxTools), "Script is empty", TaskDialogButton.OK, TaskDialogIcon.Stop).Show(this); return; } SetupTimerControls(true); LuaCancellationRequested = false; safeTimer = this.CreateTimer(luaConsoleSettings.TimerInterval, info, TimerLuaElapsed); safeTimer.Start(); NotifyUser("Timer is started", false, false); this.LogPrint("Timer enabled"); } }
public void Dispose() { cacheCleanupTimer.Dispose(); }
public void StopAndClear() { internCache.Clear(); cacheCleanupTimer?.Dispose(); }
public void OnStop() { pluginIsActive = false; timer.Dispose(); }
public void Dispose() { gatewayRefreshTimer?.Dispose(); }
private void DumperForm_FormClosing(object sender, FormClosingEventArgs e) { chatTimer?.Dispose(); }
public void OnStop() { timer.Dispose(); }