Here is the scenario:

I have a login screen in an application that sits waiting for the user to enter their credentials. There is also a LS listener on the page that shows the user the total number of active users there are currently logged in.

Overnight, the LS server gets shut down for several hours for backups to take place.

If I leave this page up in a Safari browser during this period, Safari eventually crashes. In the console, I can see "Out of memory" errors logged from line 38 in the lightstreamer.js code.

It is difficult to see what this line of code is doing because it is minified.

Some time ago, to prevent the lightstreamer.js code generating loads of console messages while the server is down, my own wrapper code detects a "DISCONNECTED:WILL-RETRY" status change and after a short period of time will disconnect from the server completely - so there is no websocket activity at all. It only reconnects after a keypress, mousdown or touchstart event on the page itself. In other words, everything is idle until the user comes back (usually in the morning) and starts work again. The LS connection starts again and all is well.

I suspected that something is not working as well in Safari, and that the "out of memory" error is simply the fact that the console was full - but there is no evidence of that. I cannot see what is going on that is causing the LS code to run out of memory in Safari.

Any ideas?