Dear jQuery team!
I've tried to create a test case where the bug occurs but unfortunately I could not. The problem is the following.
There is a complicated environment in which a plugin does multiple things. Creates nodes, does AJAX requests, binds anonymous functions on multiple events and opens new windows with "window.open" on click event too. It creates multiple nodes in the new window too.
In IE 6, 7, 8 when the user closes these opened window(s) and reloads the original page, the following error window appears:
"A Runtime Error has occurred.
Error: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute."
If the user leaves the opened window(s) open and reloads the original page the error window won't appear.
I've tried to debug it with Internet Explorer Script Debugger and it shows that the error is somewhere in the 'unload' event handler. I think the problem is that jQuery caches a reference to one or multiple objects which were in the closed window(s).
If i surrond the memory leak prevention code with a try, catch block everything works fine.