Snippet of code causing leaked objects

Every time I generate new color materials (tempMat is the new material being made) I get more and more leaked objects being cleaned up when I save. Every time I save. The number keeps adding up.
EDIT

This is in the editor.

Material tempMat = new Material (newTower.GetComponent <MeshRenderer> ().sharedMaterial);
					tempMat.color = tileColors [x + y * mapWidth];
					newTower.GetComponent <MeshRenderer> ().sharedMaterial = tempMat;

Well, you create a new material in that code. Do you Destroy it somewhere? If it’s not saved as asset to the project it will of course need to be removed by the Unity editor.

You should add more context to that snippet. Is this code in a runtime script or an editor script? Is it executed in edit mode or in playmode?