Engines/FlatRedBallXNA/FlatRedBall/IO/Csv/CsvReader.cs
/// <summary>
/// Releases the unmanaged resources used by this instance and optionally releases the managed resources.
/// </summary>
/// <param name="disposing">
/// 	<see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.
/// </param>
Releases the unmanaged resources used by this instance and optionally releases the managed resources.
Releases the unmanaged resources used by this instance and optionally releases the managed resources .
protected virtual void Dispose(bool disposing)
		{
			if (!_isDisposed)
			{
				try
				{
					if (disposing)
					{
						if (_reader != null)
						{
							lock (_lock)
							{
								if (_reader != null)
								{
									_reader.Dispose();
									_reader = null;
									_buffer = null;
									_eof = true;
								}
							}
						}
					}
				}
				finally
				{
					_isDisposed = true;
					try
					{
						OnDisposed(EventArgs.Empty);
					}
					catch { }
				}
			}
		}
protected virtual void Dispose ( bool disposing ) { if ( ! _isDisposed ) { try { if ( disposing ) { if ( _reader != null ) { lock ( _lock ) { if ( _reader != null ) { _reader . Dispose ( ) ; _reader = null ; _buffer = null ; _eof = true ; } } } } } finally { _isDisposed = true ; try { OnDisposed ( EventArgs . Empty ) ; } catch { } } } }
Releases the unmanaged resources used by this instance and optionally releases the managed resources.
Releases the unmanaged resources used by this instance and optionally releases the managed resources .
// Refer to http://www.bluebytesoftware.com/blog/PermaLink,guid,88e62cdf-5919-4ac7-bc33-20c06ae539ae.aspx // Refer to http://www.gotdotnet.com/team/libraries/whitepapers/resourcemanagement/resourcemanagement.aspx // No exception should ever be thrown except in critical scenarios. // Unhandled exceptions during finalization will tear down the process. // Dispose-time code should call Dispose() on all owned objects that implement the IDisposable interface.  // "owned" means objects whose lifetime is solely controlled by the container.  // In cases where ownership is not as straightforward, techniques such as HandleCollector can be used.   // Large managed object fields should be nulled out. // Dispose-time code should also set references of all owned objects to null, after disposing them. This will allow the referenced objects to be garbage collected even if not all references to the "parent" are released. It may be a significant memory consumption win if the referenced objects are large, such as big arrays, collections, etc.  // Acquire a lock on the object while disposing. // Ensure that the flag is set // Catch any issues about firing an event on an already disposed object.
disposing
bool
to release both managed and unmanaged resources;  to release only unmanaged resources.
to release both managed and unmanaged resources ; to release only unmanaged resources .