rive-app / rive-ios

iOS runtime for Rive
MIT License
484 stars 55 forks source link

Memory Leaks #197

Closed maxgribov closed 2 years ago

maxgribov commented 2 years ago

I noticed that RiveExample does not clear the memory when you close the view with animations.

Screenshot 2022-06-05 at 23 48 24

How to reproduce:

  1. Launch the RiveExample application (on the simulator or on the device)
  2. Open and close the Touch Events! screen several times

I also did a quick profiling on leaks and found a huge amount of them:

Screenshot 2022-06-05 at 23 45 52

It looks like leaks happen in RiveRuntime library.

duncandoit commented 2 years ago

fixed

BrotskyS commented 2 years ago

fixed

How?

duncandoit commented 2 years ago

The memory leak was related to image handling in the cpp runtime. A fix was made there and that change was propagated out to iOS.