From: Sunghyun Kim Date: Thu, 3 Jun 2021 10:53:15 +0000 (+0900) Subject: [Tizen] Remove an External texture when ImageVisual is destroyed X-Git-Tag: accepted/tizen/unified/20210609.140314^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c68c58357ed293af4056a9652dc6a3261be618d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Remove an External texture when ImageVisual is destroyed Change-Id: I9e5971ae5075b74cfab88e02c9f369f8c89f7a88 --- diff --git a/dali-toolkit/internal/visuals/image/image-visual.cpp b/dali-toolkit/internal/visuals/image/image-visual.cpp index bbbab23..eaec29d 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -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()); + } } }