mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
fix memory leak
Signed-off-by: 周思远 <zhousiyuan8@huawei.com>
This commit is contained in:
parent
a0cc051cf2
commit
61f211e569
@ -49,7 +49,11 @@ RSImageBase::~RSImageBase()
|
||||
#endif
|
||||
pixelMap_ = nullptr;
|
||||
if (uniqueId_ > 0) {
|
||||
RSImageCache::Instance().CollectUniqueId(uniqueId_);
|
||||
if (renderServiceImage_ || isDrawn_) {
|
||||
RSImageCache::Instance().CollectUniqueId(uniqueId_);
|
||||
} else {
|
||||
RSImageCache::Instance().ReleasePixelMapCache(uniqueId_);
|
||||
}
|
||||
}
|
||||
#if defined(ROSEN_OHOS) && defined(RS_ENABLE_VK)
|
||||
if (RSSystemProperties::GetGpuApiType() == GpuApiType::VULKAN ||
|
||||
|
Loading…
Reference in New Issue
Block a user