Hi,
I have the same problem in a one page web app ( AngularJS ).
We use embedpano in several "pages" in our web app.
Removing pano with removepano() at page change seems to not remove event listeners from krpano instance at removing time.
The problem arises after 10 to 20 embed / remove of panos. The message : WARNING: Too many active WebGL contexts. Oldest context will be lost. appears ( tested in Chrome / Safari OSX ).
The effect in Safari Iphone / Ipad makes webapp crash.
In krpano's function removepano() there is no removeEventListener at all. Only Dom elements removal ( seen on debugging with Developper Tools on Chrome )
With one page web applications, every event listener has to be removed ( resize events, scroll events, custom events, etc) before DOM elements are removed, in order to allow garbage collector to free memory.
Here are some tips on debugging WebGL contexts :
https://www.khronos.org/webgl/wiki/Debugging
Maybe Kaus could tell us what "id" has the Krpano Webgl context once pano is embeded ? I could go further on debugging. Thanks.
Do you have any solutions ?
Thank you !
Regards.