correct method for clearing a gameObject array

Hi. What is the correct accepted method of clearing an array of gameObjects ?

e.g.

var arrayPathMarker : GameObject[] = new GameObject[100];

for (var i = 0; i< 100; i++) {
	Destroy (arrayPathMarker*); // this , or the next command ?*

_ // arrayPathMarker*=null;_
_
}*_

Do you want to just clear the array, or destroy the objects? Setting the entries in the array to null will clear the array, but won’t destroy the objects. (Although you can just use System.Array.Clear.) Using Destroy will remove the objects, and the entries will be null. GameObjects are by reference.

I have found a method that works fine with me it checking to see if the game object is null
here is my spawn script were i have implemented my code were i destroy the spawn point after it is used

public var Respawn : GameObject;

function Start ()
{
Respawn = GameObject.FindGameObjectsWithTag(“Respawn”);

}

function Update () {
}
function rs()
{
var spawn = Random.Range(0,Respawn.Length);
if(Respawn[spawn] == null)
{
rs();
}else{
transform.position = Respawn[spawn].gameObject.transform.position;
Debug.Log(spawn);
transform.position.y = 2;
Destroy(Respawn[spawn].gameObject);
}

}

this is the code i used in my script to fix my errors with null game objects in an array

#pragma strict

public var Respawn : GameObject[];
var spawnpoint : GUIText;
function Start () {
Respawn = GameObject.FindGameObjectsWithTag("Respawn");
	
}

function Update () {
}
function rs()
{
	var spawn = Random.Range(0,Respawn.Length);
	if(Respawn[spawn] == null)
	{
	rs();
	}else{
	transform.position = Respawn[spawn].gameObject.transform.position;
	Debug.Log(spawn);
	transform.position.y = 2;
	Destroy(Respawn[spawn].gameObject);
	}

}

There is one alternative to this i thought im not sure how useful it will be to others but has helped me plenty so here it is, You can create a list based from your array, using a foreach to add each gameobject to your list, i feel lists are easier to use and clear especially so for anyone who is new to scripting, if anyone would like a step by step for this just email me Skylem@live.com.au and i’ll provide a blow by blow of how to use a list aswell as an example.