Clear Data Member Function

Clears the array and frees the underlying memory, but does not destroy the <ColorArray> object.

Prototype

int32 Clear()

Examples

Copy Text To Clipboard

auto Color fill = new Color( 255, 128, 64, 255 );

auto ColorArray a_aoArray = new ColorArray( 32, fill );
a_aoArray.Clear();

if( a_apArray.GetCount() )
{
   for( int i = 0; i < a_aoArray.GetCount(); ++i )
   {
      Console.Out( LibColor.Out( a_aoArray.Get( i ) ) );
   }
}
else
{
   Console.Out( "Array is empty!" );
}

Results

Array is empty!