Skip to main content

Bug Tracker

Side navigation

#705 closed bug (fixed)

Opened December 22, 2006 05:04PM UTC

Closed December 23, 2006 05:46PM UTC

Last modified June 20, 2007 02:47AM UTC

Leak in IE (__ie_init)

Reported by: adam@scorpiatech.com 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! :)

Attachments (0)
Change History (1)

Changed December 23, 2006 05:46PM UTC by john comment:1

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.