Destroying objects, clearing an array

Hello,

I’m working on a very simple game. It displays 15 buttons and one of them is covered with a different sprite. It works fine for one round. But on the next round, i want to clear the array containing the 15 buttons to set a new one. And it s not working, i’m getting 15 new buttons on each round ( so it makes 30 buttons on the second round, 45 on the third…). I guess that my destroy function doesn’t look for the good gameobject ( it’s located in the “reussi” method)
Thanks for your help !

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;


public class InitBouttons : MonoBehaviour {

public Button prefabBoutton;
public Button[] listeBouttons;
public Transform monpere;
public Sprite recouvrement;
public GameObject pannelReussi;
public GameObject pannelTemps;
Text montexte;

int tirageAuSort;
int score = 0;

float timeMax= 15f;
float timeRemaining ;

bool reussite= false;




void Start ()
{

	montexte= pannelTemps.GetComponent<Text>();
	timeRemaining=timeMax;
	initialisation();	
}
	

	void Update ()
{


		if (!reussite) {
			timeRemaining -= Time.deltaTime; // on soustrait au temps restant en secondes
			UpdateTimeRemainingDisplay ();
}



		if (timeRemaining <= 0f)
{
			Debug.Log ("gameover");
}

		if ( reussite && Input.GetMouseButton (0) )
		initialisation();

		


				//if (EventSystem.current.currentSelectedGameObject.name != null)
				//Debug.Log (EventSystem.current.currentSelectedGameObject.name);

				//if ( EventSystem.current.currentSelectedGameObject.name == listeBouttons[tirageAuSort].name) Debug.Log ("bravo!");


		
			
		
	}


	void initialisation ()
	{
		pannelReussi.SetActive (false);
		reussite = false;
		listeBouttons = new Button[15]; 


		for (int i = 0; i < 15; i++) 

		{
			listeBouttons *= Instantiate (prefabBoutton);*

_ listeBouttons .transform.SetParent (monpere, false);_
_ listeBouttons .name = “” + i;
Debug.Log (listeBouttons .name = “” + i);_

* }*

* tirageAuSort = Random.Range (0, 15);*
* //listeBouttons[tirageAuSort].GetComponent().color = Color.black; si on veut changer la couleur*
* listeBouttons [tirageAuSort].GetComponent ().sprite = recouvrement; // on change l’image*
* listeBouttons [tirageAuSort].onClick.AddListener (() => Reussi ());*

* }*

* bool Reussi ()*
* {*
* pannelReussi.SetActive(true);*
* score ++;*
* reussite = true;*
* timeMax --;*
* timeRemaining = timeMax;*

* for (int i = 0; i < 15; i++) // the loop to destroy clear the array by destroying the button*
* {*
_ Debug.Log (" J’efface le bouton " + listeBouttons*.name);*
DestroyImmediate (listeBouttons );_

* }*

* return reussite;*

* }*

void UpdateTimeRemainingDisplay()
{
montexte.text = "Temps restant: " + Mathf.Round (timeRemaining).ToString (); // on affiche le tempts restant, Mathf.round arrondit
}

}

well, i found a way to solve it .

i replace : DestroyImmediate (listeBouttons );
by
Destroy(listeBouttons*.gameObject);*