Why is my scene full of empty gameObjects ?

In my game, I create an object called generator every frame, that has to render terrain around itself, then I destroy it (I use cubes as terrain). I don’t know if this particular script is faulty, but the scene keeps filling with empty gameObjects that cause a lot of lag, although I did not instantiate them manually. They even appear too fast for the game to efficiently delete… here the script that locates the terrain generator :
(The empty gameObjects have no components, no tag, are all at (0,0,0), are called “New Game Object”, and are not parented where the terrainRenderers are !)

public class GenLocator : MonoBehaviour {

public GameObject terrainRenderer; // The thing that makes the cubes
public GameObject world; // Parent for the cubes and the terrainRenderer

private Transform player;
private int renderDistance; // How far do I render ?
private int spawnHeight; // To make sure Player is above Ground

// Use this for initialization
void Start () {
	player = GetComponent<Transform> ();
	renderDistance = terrainRenderer.GetComponent<Render>().renderDistance;
	spawnHeight = terrainRenderer.GetComponent<Render> ().renderMaxY;
	player.Translate (new Vector3(0,spawnHeight,0));

// Update is called once per frame
void Update () {
	Vector3 translator = new Vector3(0,0,renderDistance*7/8); // The terrainRenderer is 7/8 of a renderDistance from the player, so the player is on terrain
	translator = Quaternion.Euler (0,player.rotation.eulerAngles.y,0)*translator; // Rotate the vector to follow the player's sight
	Vector3 position = new Vector3 (Mathf.Ceil (translator.x)+player.position.x,Mathf.Ceil (translator.y),Mathf.Ceil (translator.z)+player.position.z); // Rounding Coordinates and making them relative to the player
	GameObject instantiatedRenderer = (GameObject) Instantiate (terrainRenderer,position,Quaternion.identity);
	instantiatedRenderer.GetComponent<Render> ().world = world;
	instantiatedRenderer.GetComponent<Transform> ().SetParent (world.transform); 


EDIT : the generator NEEDS to be instantiated every frame to render blocks in front of the player. The Render Script it contains deletes it : (good luck reading that)

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;

public class Render : MonoBehaviour {

public GameObject renderTile; // Used to generate the World
public GameObject world;
public int renderDistance=16; // Render distance
public int renderMaxY=64; // Max block height
public float renderYScale=15.0f; // Vertical scale factor of the Perlin image (Steepness)
[Range(0f,1f)]public float renderXScale=0.01f; // Horizontal scale factor of the Perlin image (Detail) (Not used internally)
public int renderThickness = 1; // Ground thickness (1 is enough in most cases)
public int renderMinY = 1; // Ground height (Too low = holes in the ground)
public int renderSeed= 0; // Generation will start from coordinates (seed;seed) of the Perlin image
public GUIText debugText; // Just in case;

// Use this for initialization
void Start () {
	Transform center = GetComponent<Transform> ();
	List<int> renderedX = new List<int>();
	List<int> renderedZ = new List<int>();
	float Perlin;

	foreach (GameObject o in FindObjectsOfType<GameObject>()) {
		if (o.tag=="Cube"){
			if (o.transform.position.x<center.transform.position.x-renderDistance) {
			else if (o.transform.position.x>center.transform.position.x+renderDistance) {
			else if (o.transform.position.z<center.transform.position.z-renderDistance) {
			else if (o.transform.position.z>center.transform.position.z+renderDistance) {
			// If analizedCube is outside the renderDistance square around the player, then delete it.
			else {
				int coordX = Mathf.CeilToInt(o.transform.position.x);
				int coordZ = Mathf.CeilToInt(o.transform.position.z);
		else if (o.tag=="Untagged"){
			DestroyImmediate (o);
	for (int z=Mathf.CeilToInt(center.position.z)-renderDistance; z<center.position.z+renderDistance; z++) { // As long as we are within the renderdistance on Z
		for (int x=Mathf.CeilToInt(center.position.x)-renderDistance; x<Mathf.CeilToInt(center.position.x)+renderDistance; x++) { // As long as we are within the renderdistance on X
			if (!renderedX.Contains (x)||!renderedZ.Contains (z)){

				Perlin = PerlinMake (x,z,renderXScale,renderYScale,renderSeed,renderMinY,renderMaxY);
				GameObject cube = new GameObject();
				for(int y=0; y < renderMaxY; y++){
					if (y>Perlin-renderThickness && y<=Perlin){
						cube = (GameObject) Instantiate(renderTile,new Vector3(x,y,z),Quaternion.identity);
						cube.GetComponent<Renderer>().material.color = new Color (0.0f,PerlinMake (x,z,renderXScale),0.0f);
					}// Create a cube if y is between the Perlin coordinate and the Perlin coordinate minus the ground thickness, then parent it to the Generator.

// Update is called once per frame
void Update () {
float PerlinMake(float coordX, float coordZ, float scaleX, float scaleY=1, int seed=0, float min=0, float max=1){
	coordX = (coordX + seed) * scaleX;
	coordZ = (coordZ + seed) * scaleX;
	float Perlin = Mathf.PerlinNoise (coordX,coordZ);
	Perlin *= scaleY;
	Perlin += min;
	Perlin = Mathf.Clamp (Perlin,min,max);
	return Perlin;


I found the problem : The terrainRenderer tries to delete itself the same frame it was intantiated, which causes it to fail deleting. The GenLocator script looses reference to the terrainRenderer because it has been partially deleted so it is not able to parent it to the right GameObject.