mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
!17349 fix memory leak
Merge pull request !17349 from chuchengcheng/cherry-pick-1732195321
This commit is contained in:
commit
0862c0c5be
@ -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