Skip to content

MTLTexture resize的纹理泄漏问题 #18681

Open
@Zhengbledor

Description

@Zhengbledor

Cocos Creator version

3.8.3

System information

iOS 18.3

Issue description

Image
当游戏resize(或者转屏)时,_colorTexture会执行一次resize,内部会创建一块MTLTexture

Image
然后update把持有的mtlTexture置空/置换,而已申请的mtlTexture没有释放

我尝试hook newTextureWithDescriptor方法,然后弱持有这块纹理并存起来,并且不断的做resize
每做一次resize,存起来的未被释放的纹理数量就会多一块

Relevant error log output

Steps to reproduce

1

Minimal reproduction project

No response

Metadata

Metadata

Assignees

Labels

BugNeeds TriageNeeds to be assigned by the team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions