protected override void dispose( bool disposeManagedResources )
{
if ( !this.IsDisposed )
{
if ( disposeManagedResources )
{
// Dispose managed resources.
if ( this.lightCap != null )
{
if ( !this.lightCap.IsDisposed )
this.lightCap.Dispose();
this.lightCap = null;
}
if ( this.wBuffer != null )
{
if ( !this.wBuffer.IsDisposed )
this.wBuffer.Dispose();
this.wBuffer = null;
}
if ( this.positionBuffer != null )
{
if ( !this.positionBuffer.IsDisposed )
this.positionBuffer.Dispose();
this.positionBuffer = null;
}
if ( this.subEntity != null )
{
if ( !this.subEntity.IsDisposed )
this.subEntity.Dispose();
this.subEntity = null;
}
if ( this.currentVertexData != null )
{
if ( !this.currentVertexData.IsDisposed )
this.currentVertexData.Dispose();
this.currentVertexData = null;
}
}
// There are no unmanaged resources to release, but
// if we add them, they need to be released here.
}
// If it is available, make the call to the
// base class's Dispose(Boolean) method
base.dispose( disposeManagedResources );
}