-
Notifications
You must be signed in to change notification settings - Fork 20
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
Patcher: remove wrappers when window is closed to avoid memory leaks #45
Labels
Comments
Testcase: var count = 25;
function leakTestPrototype() {
for(var i = 1; i <= count; ++i) {
var win = window.openDialog(location.href, "", "chrome,all");
win.addEventListener("load", function loader(e) {
win.document.documentElement.setAttribute("titlemodifier_normal", "[" + i + "/" + count + "]");
win.removeEventListener(e.type, loader, false);
win.setTimeout(function() {
win.close();
leakTestPrototype.__gen.next();
}, 500);
}, false);
yield;
}
yield;
}
var leakTest = leakTestPrototype.__gen = leakTestPrototype();
leakTest.next();
|
Infocatcher
added a commit
that referenced
this issue
Apr 26, 2013
Looks fixed for me. But there is another possible (and known) issue: if patcher unable to restore original function (in case of patches from third-party extensions), wrapper will not be completely removed to preserve functionality (but not memory). |
Infocatcher
added a commit
to Infocatcher/Download_Panel_Tweaker
that referenced
this issue
Apr 28, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems like garbage collector can't cleanup links to global extension object after window will be closed.
The text was updated successfully, but these errors were encountered: