Destroying an array of SplineMeshComponents

I’m trying to destroy all the elements of an array of spline mesh components using a for loop to destroy each mesh but every time it enters the array, the editor crashes and tells me: Array index out of bounds : 16 from array of size 16(The size of the array will be changing at runtime so I can’t create a static array). I appreciate any help on what is the proper way of doing this task. Note I have tried setting index to just the array’s Num() without the -1. But this does not fix the issue either.

void ControllerItem::ClearArc()
{
	if (splineMeshes.Num() > 0)
	{
		for (int32 index = splineMeshes.Num() - 1; index > 0; index--)
		{
			splineMeshes[index]->DestroyComponent();
		}
		splineMeshes.Empty();
		ArcSpline->ClearSplinePoints(true);
	}	
}

I found a solution which works really well:

void ControllerItem::ClearArc()
{
	//Checks if it is valid at index zero because index zero is always going to exist if the array has any elements
	if (splineMeshes.IsValidIndex(0))
	{
		while(splineMeshes.IsValidIndex(0))
		{
			//Debug message for checking to see if a spline was destroyed(which it is).
			UE_LOG(LogTemp, Warning, TEXT("DestroyComponent Called on object: %s"), *splineMeshes[0]->GetName());
			//This destroys the component but it does not remove it from the array.
			splineMeshes[0]->DestroyComponent();
			splineMeshes.RemoveAt(0);
		}
	}

	ArcSpline->ClearSplinePoints(true);
}

You rock!!! Thank you for answering your post. This problem was testing my patience.