Added some memory leak protection.
authorJohn Resig <jeresig@gmail.com>
Mon, 17 Jul 2006 04:57:07 +0000 (04:57 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 17 Jul 2006 04:57:07 +0000 (04:57 +0000)
ajax/ajax.js

index 1960150..6f289bb 100644 (file)
@@ -170,8 +170,12 @@ jQuery.extend({
        
                                // Process result
                                if ( ret ) ret(xml);
+
+                               // Stop memory leaks
+                               xml.onreadystatechange = function(){};
+                               xml = null;
                        }
-               }
+               };
        
                // Send the data
                xml.send(data);