Web Worker Memory Leak?

jmvx0uaq

New Member
I've been using Chrome's Timeline view to attempt to track down some memory leaks in my page. I've found one particular memory leak that results from instantiating web workers that I can't seem to figure out how to get rid of.I've stripped down the page to just load the web worker and do nothing else. Every time I refresh the page, the Document Count on Chrome's timeline view permanently increases by 1. If I comment out the call to the Worker constructor, and begin refreshing the page, the document count increases and then decreases, effectively staying the same. Here is my entire .htm file:\[code\]<html><script type="text/javascript">var worker_blob = new Blob(["var test = 1;"]);var worker_url = window.URL.createObjectURL(worker_blob);// Comment out the line below and the memory leak goes awayvar worker = new Worker(worker_url);window.URL.revokeObjectURL(worker_url);</script></html>\[/code\]
 
Back
Top