MSStickerView animation high memory usage

99 Views Asked by At

I'm developing a custom iMessages sticker pack application and I'm experiencing extremely high memory usage, which is crashing my application, when animating stickers.

All my graphics are under 500kb in size, formatted as GIFs.

Without animation my app's memory usage holds steady. As soon as an MSStickerView starts animating (startAnimating()) memory usage jumps up by about 35mb. When all stickers in the view animate the memory usage is high enough to crash the application.

Through the profiler I've traced the allocations to ImageIO_Malloc calling mmap. Because this is inside MSStickerView's implementation I don't think there's anything I can do about it.

Has anyone else experienced this? Does anyone know how to work around it?

memory graph

0

There are 0 best solutions below