Jquery1.3.2 and jquery1.4 + do not exist.
Through comparison, we finally find a difference between the two versions.
Jquery1.4 + added a section in the Ajax Method CodeUsed to call the onreadystatechange method in abort.
Copy codeThe Code is as follows: Try {
VaR oldabort = xhr. Abort;
Xhr. Abort = function (){
If (xhr ){
Oldabort. Call (xhr );
}
Onreadystatechange ();
};
} Catch (e ){}
After investigation, it is this assignment that produces an error.
The readystate of onreadystatechange is 4. When the operation succeeds, xhr. Abort is destroyed.
Memory leakage solution
In addition, if xhr. Abort = NULL, I do not know why the error is reported in IE6.
Try... Catch it. IE6 does not correct errors and does not have any problems.
The cause of this problem is unknown in IE8.
Maybe xhr. Abort and oldabort generate a closure?
But why does IE6 not leak?