Skip to content

Data: remove the expando when there's no more data; minor cleanup #2271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

timmywil
Copy link
Member

@timmywil timmywil commented May 6, 2015

  • This also removes the Data#discard() method, which we never used, and the initial paramater in Data#register() – also never used.

Fixes gh-1760

@rwaldron
Copy link
Member

rwaldron commented May 6, 2015

LGTM.

div.removeData( "some" );

// Make sure the expando is gone
for ( key in div[ 0 ] ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A similar test for on+off would be nice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll add that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@timmywil timmywil closed this in 56bb677 May 12, 2015
@timmywil timmywil deleted the 1760-data branch May 12, 2015 14:10
timmywil added a commit that referenced this pull request Nov 10, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

.off() does not clean up empty cache entries
4 participants