mirror of
https://github.com/jquery/jquery.git
synced 2024-10-05 11:34:18 +00:00
Clear elements to avoid leaking memory. Close gh-837. Fixes #11809
This commit is contained in:
parent
7a9b57aa69
commit
b6d02735e9
@ -341,6 +341,9 @@ jQuery.fn.extend({
|
||||
}
|
||||
}
|
||||
|
||||
// Fix #11809: Avoid leaking memory
|
||||
fragment = first = null;
|
||||
|
||||
if ( scripts.length ) {
|
||||
jQuery.each( scripts, function( i, elem ) {
|
||||
if ( elem.src ) {
|
||||
@ -708,7 +711,7 @@ jQuery.extend({
|
||||
// Fix #11356: Clear elements from safeFragment
|
||||
if ( div ) {
|
||||
safe.removeChild( div );
|
||||
div = safe = null;
|
||||
elem = div = safe = null;
|
||||
}
|
||||
|
||||
// Reset defaultChecked for any radios and checkboxes
|
||||
|
Loading…
Reference in New Issue
Block a user