From 1395c590d86c4e93f70501355aaa82f0eca1ecde Mon Sep 17 00:00:00 2001 From: Canming Huang Date: Mon, 8 Nov 2021 14:10:41 -0500 Subject: [PATCH] Fixed issue #66 --- .../Assets/Emgu.TF.Lite/Demo/CocoSsdMobilenetBehavior.cs | 1 + 1 file changed, 1 insertion(+) 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)