madrobby/zepto — Issue #381: Leaking $.fn.data
Author: justinbmeyer
Created: 2012-01-22 20:10:58+00:00
State: open

By looking at the $.data code (https://github.com/madrobby/zepto/blob/master/src/data.js) , it seems data put in the store does not clean itself up when an element is removed like it does in jQuery. jQuery accomplishes this by calling cleanData whenever an element is removed. It might be possible for that plugin to overwrite empty and remove to do this.

They each will have to go through all elements (including children) of elements that are being removed from the DOM.

If this is something you'd want, I can fix it.