Posts

Post not yet marked as solved
3 Replies
0 Views
So it seems we've found the solution to our problem. What caused the issue in iOS 15 was that we created a object list with canvas elements as properties and store them to a local variable and later assigned it to the this context. To explain we had a method, let's call it createAnimationList, which created and returned a list of objects which in turned contained a canvas element (deeper down in properties). var animationList = createAnimationList(); These items would after that be rendered to the canvas scene. Where the error happened was that we after that assigned it to the this context of the object which called the method from the beginning. var animationList = createAnimationList(); addToCanvasScene(animationList); this.animationList = animationList; Next time this code was called the list created temporarily in animationList variable was kept in memory. What we did to fix this was add defensive coding to make sure createAnimationList wasn't called again. This might seem obvious looking at this simple example (the truth is a more complex obviously). Something to think about is that our canvas elements was cache handled before with canvas.context.clearRect(0, 0, width, height), canvas.context.setTransform(1, 0, 0, 1, 0, 0), and more. This cache clearing works for us in all versions earlier than iOS 15