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
memory leak ui.widget #513
Conversation
…Fixed #7808 - ui.widget Memory (private bytes of IE process) increases when create and destroy of the simple widget are repeated.
Can you explain what's causing the memory leak? I really don't want to land this fix without knowing, because if the solution is to not use |
The reference of the variables ( element, instance) of the _bind method remains. fix code test code |
// bugfix memory leak http://bugs.jqueryui.com/ticket/7808 | ||
var ret = ( typeof handler === "string" ? instance[ handler ] : handler ) | ||
.apply( instance, arguments ); | ||
instance = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this break the event handler for future events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no problem because it makes it to null after the event in the future is executed.
function handlerProxy() {
:
instance = null;
retrun ret;
}
I'm not actually seeing any difference using sIEve (and it's not reporting any leaks before or after your change). |
Performance monitor result. (Windows XP SP3 + IE8) iexprloer#1 (fix code) iexplorer#2 (master code) "(PDH-CSV 4.0) ()(-540)","\KAMATAPC2\Process(iexplore#1)\Private Bytes","\KAMATAPC2\Process(iexplore#2)\Private Bytes" |
We've never been able to recreate the issue and we'll drop support for IE6 in 1.10. |
Widget: modified _createWidget method and added __destroy method.
Fixed #7808 - ui.widget Memory (private bytes of IE process) increases when create and destroy of the simple widget are repeated.
master code memory leak test
http://jsfiddle.net/NzJGH/5/
my code memory leak test (fixed)
http://jsfiddle.net/yoshi6jp/NzJGH/11/