How to destroy Sprite.Create leak?

I’m creating a sprite in c# like this:

    Texture2D t = new Texture2D(2,2);
	t.filterMode = filterMode;
	t.wrapMode = textureWrapMode;
	t.alphaIsTransparency = alphaIsTransparency;	
	t.anisoLevel = anisoLevel;
	t.hideFlags = HideFlags.DontSave;

	Sprite s = Sprite.Create(t, new Rect(0,0, t.width, t.height), 
           v2, pixelsToUnits);	
	s.hideFlags = HideFlags.DontSave;

	GetComponent<SpriteRenderer>().sprite = s;

And that works fine, but the editor complains after a while that the sprite and texture are being leaked:

“Sprite has been leaked 1 times” etc

How do I stop leaking?

Textures are not garbage collected. So if you create a texture using new Texture then you need to destroy the texture with Destroy( myTexture ) when you no longer need it. If you don’t do this then unity will detect that a texture has been leaked and give you the error.
Its also possible to force unity to clean up leaked textures at runtime by calling Resources.UnloadUnusedAssets but its much more efficient to use Destroy.