fix: balance Texture2D image dependency references - #267
Conversation
Code Size Check Report
Interface Check ReportThis pull request does not change any public interfaces ! |
|
@Changdw, Please check the result of
Task Details |
|
@Changdw, Please check the result of
Task Details |
概述本次修改修复了 Texture2D 的预加载依赖与 _mipmaps 依赖指向同一 ImageAsset 时,上传完成后引用计数残留的问题。 根因setProperties() 会分别为预加载依赖和 _mipmaps[i] 的纹理依赖建立引用。 修复方案
兼容性
测试方法以下是一个我做的冒烟测试 demo. 具体测试说明见demo中的文档. |
|
需要backport到3.8.9 |
|
@Changdw, Please check the result of
Task Details |
|
@Changdw, Please check the result of
Task Details |
|
@Changdw, Please check the result of
Task Details |
|
@Changdw, Please check the result of
Task Details |
Re: https://forum.cocos.org/t/topic/176993
Changelog
ImageAssetreference-count leak when aTexture2Dpreload dependency and_mipmapsdependency reference the same image.decRef()once for each removed dependency edge.Texture2Dregression test to verify that duplicate dependency edges are fully released.Continuous Integration
This pull request:
Compatibility Check
This pull request: