MonoMobile.Views.BaseDialogViewSource.Dispose C# (CSharp) Method

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void
		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				Controller = null;
			
				if (CellFactory != null)
				{
					CellFactory.Dispose();
					CellFactory = null;
				}

				foreach(var section in Sections.Values)
				{
					var disposable = section as IDisposable;
					if (disposable != null)
					{
						disposable.Dispose();
						disposable = null;
					}
				}
			}

			base.Dispose(disposing);
		}