Optimize cleanData: allow direct access to data_priv for cleanup

This commit is contained in:
Rick Waldron
2013-04-17 12:53:41 -04:00
committed by Dave Methvin
parent 5e8a5f4adc
commit c1b8edfcc9
2 changed files with 25 additions and 23 deletions

View File

@@ -185,7 +185,9 @@ Data.prototype = {
);
},
discard: function( owner ) {
delete this.cache[ this.key( owner ) ];
if ( owner[ this.expando ] ) {
delete this.cache[ owner[ this.expando ] ];
}
}
};