diff --git a/Emgu.TF.Lite.Unity/Assets/Emgu.TF.Lite/Demo/CocoSsdMobilenetBehavior.cs b/Emgu.TF.Lite.Unity/Assets/Emgu.TF.Lite/Demo/CocoSsdMobilenetBehavior.cs index dd489841f..d492f54bd 100644 --- a/Emgu.TF.Lite.Unity/Assets/Emgu.TF.Lite/Demo/CocoSsdMobilenetBehavior.cs +++ b/Emgu.TF.Lite.Unity/Assets/Emgu.TF.Lite/Demo/CocoSsdMobilenetBehavior.cs @@ -61,6 +61,7 @@ private void DrawToTexture(Texture texture, Annotation[] annotations, Texture2D Texture2D tmp = new Texture2D(texture.width, texture.height, GraphicsFormat.R8G8B8A8_SRGB, texture.mipmapCount, TextureCreationFlags.None); Graphics.CopyTexture(texture, tmp); _drawableTexture.SetPixels32(tmp.GetPixels32()); + Destroy(tmp); } foreach (Annotation annotation in annotations)