Skip to content

Memory Leak when animation is playing in iOS #47108

@MxSoul

Description

@MxSoul

Steps to Reproduce

@dnfield @liyuqian : We reproduced the problem(#31303) in a scene with repeated animations in iOS. Through Instrument, we have determined that the reason for the growth of memory is that the
GrUniqueKeyInvalidatedMessage was not deleted after it was created. So the size of fUniqueKeyInvalidatedMessages in SkImage_Lazy is getting bigger and bigger.
image
image

My Questions

  1. We can't find where consumption fUniqueKeyInvalidatedMessages except the destructor of SkImage_Lazy(This destructor is not called while the animation is playing). When does the GrUniqueKeyInvalidatedMessage will be used ?
  2. How to fix this issue in v1.5.4 ? (We use custom engine)

Target Platform: iOS any version
Flutter version: v1.5.4
bts. Master also have this problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: performanceRelates to speed or footprint issues (see "perf:" labels)dependency: skiaSkia team may need to help usengineflutter/engine repository. See also e: labels.perf: memoryPerformance issues related to memory

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions