ISSUE:
Garbage cleanup is assigned to an anonymous function. Sometimes
onunload is used by other logic that may need jQuery to perform
certain tasks. The ability to unbind/bind the garbage collection
routine is handy to bump execution order.

SUGGESTED SOLUTION:
Assign garbage collection routine to a named closure.

PATCH FILE:
3106,3111c3106,3111
< jQuery( window ).bind( 'unload', function(){
<       for ( var id in jQuery.cache )
<               // Skip the window
<               if ( id != 1 && jQuery.cache[ id ].handle )
<                       jQuery.event.remove( jQuery.cache[ id ].handle.elem );
< });
---
> jQuery.fn.oscarTheGrouch = function(){
>     for ( var id in jQuery.cache )
>         // Skip the window
>         if ( id != 1 && jQuery.cache[ id ].handle )
>             jQuery.event.remove( jQuery.cache[ id ].handle.elem );
> }; jQuery( window ).bind( 'unload', jQuery.fn.oscarTheGrouch );

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to