aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core.js3
-rw-r--r--src/data.js2
-rw-r--r--src/manipulation.js2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js
index 907e40eb1..a9ad6bf6a 100644
--- a/src/core.js
+++ b/src/core.js
@@ -36,6 +36,9 @@ var
// Used for detecting and trimming whitespace
core_rnotwhite = /\S/,
core_rspace = /\s+/,
+
+ // List of deleted data cache ids, so we can reuse them
+ core_deletedIds = [],
// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
diff --git a/src/data.js b/src/data.js
index 1545968fe..6a30980e6 100644
--- a/src/data.js
+++ b/src/data.js
@@ -32,7 +32,7 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
if ( isNode ) {
- elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+ elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
} else {
id = internalKey;
}
diff --git a/src/manipulation.js b/src/manipulation.js
index ef305032e..43bb9a0a0 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -829,7 +829,7 @@ jQuery.extend({
elem[ internalKey ] = null;
}
- jQuery.deletedIds.push( id );
+ core_deletedIds.push( id );
}
}
}