To sum up after tests and experiments:
Safari garbage collection doesn’t free resources fast enough (see issues with fast changing canvas)
At the same time, you are reaching limits on memory footprint. Just close enough to the limit that resizing canvas leads to a lost context.
I can think of 2 potential solutions:
- when a resize occurs, dispose the engine and create a new one. I’m not very confident with this one as I think the GC will not kick fast enough
- Or do not resize and change the css to display properly based on orientation/size of the page. I think this is the most reasonable solution.