/// <summary>
        /// Releases unmanaged and - optionally - managed resources
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!_isDisposed)
            {
                if (disposing)
                {
                    if (_headerStyle != null)
                    {
                        _headerStyle.Dispose();
                    }

                    if (_footerStyle != null)
                    {
                        _footerStyle.Dispose();
                    }

                    if (_itemStyle != null)
                    {
                        _itemStyle.Dispose();
                    }

                    if (_controlStyle != null)
                    {
                        _controlStyle.Dispose();
                    }
                }
            }

            _isDisposed = true;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Inherited method from Idisposable Interface for handling manual dispose of object.
 /// </summary>
 public void Dispose()
 {
     if (!isDisposed)
     {
         _linkStyle.Dispose();
         _rowStyle.Dispose();
         _innerTableRowStyle.Dispose();
         _headerStyle.Dispose();
         _headerTitleStyle.Dispose();
         _innerTableAlternateRowStyle.Dispose();
         isDisposed = true;
         GC.SuppressFinalize(this);
     }
 }