Question

I am using Mike Alsup's excellent blockUI jQuery plugin, but I seem to be hitting an issue in IE7 (yes, the company's browser of choice...) where each use of the block adds about 25kb of memory to the process, and never seems to go away. This wouldn't be an issue normally, but the page uses the block at least once every minute, and is meant to be up on screen all day without a refresh.

I've measured this using sIEve, and by turning the plugin on or off I can consistently get a bump of that much each time. Tried it with both 2.36 and the most recent 2.44.

Has anyone seen this behavior or know of any good fixes or places to look?

EDIT: Following sergio's advice to try JS Leak Detector (gave me the stack trace that sIEve didn't), I've determined the issue is on line 241:

$(el).data('blockUI.onUnblock', opts.onUnblock);

Seems like an issue with how jQuery is handling extra data. Would this be a jQuery core issue, or how blockUI is handling it?

Was it helpful?

Solution

Try using this tool JavaScript Memory Leak Detector (v2) to detect any leaks in your site...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top