Bug Tracker

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#705 closed bug (fixed)

Leak in IE (__ie_init)

Reported by: [email protected] Owned by:
Priority: major Milestone:
Component: event Version:
Keywords: leak, ie, document.ready Cc:
Blocked by: Blocking:

Description

Found a leak bug, this time in IE using the document.write/ie_init hack to use $(document).ready(). Drip reports that this element is leaked using jQuery 1.0.4 (I've got IE7 running on XP SP2):

<SCRIPT id=__ie_init src="//:" defer __drip_hooked="true"></SCRIPT> 

This simple patch fixes it without affecting $(document).ready():

@@ -1387,6 +1387,7 @@ new function(){
                        };

                // Clear from memory
+               script.parentNode.removeChild(script);
                script = null;

        // If Safari  is used

I can't think of another way to prevent the leak...but feel free to fix this however you see fit! :)

Change History (1)

comment:1 Changed 15 years ago by john

Milestone: 1.1
Resolution: fixed
Status: newclosed
Version: 1.0

The script element is already removed in the "onreadystatechange" function. It does this be referring to 'this' instead of 'script' (avoiding the leak). I think this may be sufficient.

Note: See TracTickets for help on using tickets.