private void Free() { thread = null; // release events stopEvent.Close(); stopEvent = null; } #endregion