]> source.dussan.org Git - jquery.git/commitdiff
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 1960150e34ac6065e7d956777611f6d7dca815d7..6f289bbd25c9683653f1cfc0f2ecbd4f17643d51 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);