Opened 11 years ago
Closed 10 years ago
#13563 closed defect (fixed)
symbol build option causes memory leak on IE
Reported by: | Rawld Gill | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | low | Milestone: | 1.8 |
Component: | BuildSystem | Version: | 1.6.1 |
Keywords: | needsreview | Cc: | Bryan Forbes, liucougar |
Blocked By: | Blocking: |
Description
The functionality in #13352 introduces named function expressions (NFEs) which cause memory leaks on IE (see http://kangax.github.com/nfe/). A named function expression looks like this:
var f = function g(){};
In IE, this will actually create two different functions and assign one to "f" and one to "g". Since they both reference each other through a closure, IE won't garbage collect them. In order for IE to garbage collect them, you have to null out the "named" function:
var f = function g(){}; var g = null;
The leaks are cleared up when the browser refreshes or you close the browser, but this is still a leak on single-page applications since you can't reclaim the memory except by navigating away from the page.
This feature is opt-in and would likely *not* be used for released code. Also, the implementation of this feature did not change in 1.7 compared to prior versions.
Change History (4)
comment:1 Changed 11 years ago by
Owner: | set to Rawld Gill |
---|---|
Status: | new → assigned |
comment:2 Changed 11 years ago by
Component: | General → BuildSystem |
---|
comment:3 Changed 10 years ago by
Keywords: | needsreview added |
---|
i'm wondering if we shouldn't just add some kind of log message during a build to warn developers of this problem and then close this ticket. i'm not sure there's anything we can do to fix it.