[Tizen] Remove an External texture when ImageVisual is destroyed
authorDongsug Song <dongsug.song@samsung.com>
Mon, 14 Jun 2021 09:04:29 +0000 (18:04 +0900)
committerDongsug Song <dongsug.song@samsung.com>
Mon, 14 Jun 2021 09:04:33 +0000 (18:04 +0900)
This reverts commit 7f55bcf3436a75d9849194ca31817bb061e662a4.

Change-Id: I04fe12db27601d6de1780eefa69a7821d2f0e64b

dali-toolkit/internal/visuals/image/image-visual.cpp

index bbbab23..eaec29d 100644 (file)
@@ -192,6 +192,12 @@ ImageVisual::~ImageVisual()
     {
       RemoveTexture();
     }
+
+    // Remove ExternalTexture When ImageVisual is destroyed
+    if(mImageUrl.IsValid() && mImageUrl.GetProtocolType() == VisualUrl::TEXTURE)
+    {
+      mFactoryCache.GetTextureManager().RemoveExternalTexture(mImageUrl.GetUrl());
+    }
   }
 }