Created attachment 198755 [details]
Example of typed array initialization and failure of garbage collector.
Steps to reproduce the problem:
1. Define a function that initializes a typed array.
2. Execute the function.
3. Observe the typed array not being garbage collected when falling out of scope.
The garbage collector should release memory from all variables defined in the function closure. Memory associated with the typed array is not released at any point during the life cycle of the web app. Memory is not released on tab close, but only on application close.
Additionally, allocating a typed array seems to consume more memory than it should. For example,
var arr = new Float32Array(268435456);
allocates 1 gigabyte for array storage; however, WebKit consumes ~4 GB.
Check on a webkit nightly, my testing shows this as fixed
Oliver, what type of tests did you conduct?
This is still an open issue on my end (using WebKit nightly). If you open the Activity Monitor, you will see 500 MB allocated by "SafariForWebKitDevelopment Web Content". This memory is not released until the application closes.
This bug also exists when initializing instances of ArrayBuffer. Webkit nightly does not release memory until the application closes.
See also: bug 119049.
*** This bug has been marked as a duplicate of bug 119064 ***