I'm building a manual garbage collection to prevent mermory leaks using a jQuery flush-method (like the one found at stackoverflow). I want to unbind all events before the window closes or is reloaded.

But it seems like the unload event isn't called in Safari (5.0.2) and Opera (10.62), is it because I'm currently testing the script with a alert?

Is there a somewhat reliable workaround?