Leak Finder: a new tool for JavaScript
Wednesday, August 8, 2012
Leak finder for JavaScript helps web application developers find memory leaks in their JavaScript programs.
In garbage-collected languages, such as JavaScript, you cannot have traditional memory leaks by forgetting to free memory: when all references to an object are dropped, the object is garbage-collected and the memory is freed.
However, JavaScript programs can leak memory by unintentionally retaining references to objects. For example the references can be pointers to objects stored in a data structure in a JavaScript library (e.g., Closure) instead of the application code. If an object is unintentionally retained, all objects it points to are kept alive as well. This will lead to superfluous memory consumption.
In garbage-collected languages, such as JavaScript, you cannot have traditional memory leaks by forgetting to free memory: when all references to an object are dropped, the object is garbage-collected and the memory is freed.
However, JavaScript programs can leak memory by unintentionally retaining references to objects. For example the references can be pointers to objects stored in a data structure in a JavaScript library (e.g., Closure) instead of the application code. If an object is unintentionally retained, all objects it points to are kept alive as well. This will lead to superfluous memory consumption.
https://code.google.com/p/leak-finder-for-javascript/
No comments:
Post a Comment