mirror of
https://github.com/jquery/jquery.git
synced 2026-02-07 09:25:08 -05:00
Clear elements to avoid leaking memory. Close gh-837. Fixes #11809
This commit is contained in:
committed by
Rick Waldron
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
|
||||
|
||||
Reference in New Issue
Block a user