how is memory accessed in javascript?
-
where is (say Math, whatever it is) stored??abson– abson2010-12-23 07:43:24 +00:00Commented Dec 23, 2010 at 7:43
-
1discover an exploit in the javascript engine but it's not very general solution though, may not fit your purpose:)user44298– user442982010-12-23 08:06:00 +00:00Commented Dec 23, 2010 at 8:06
Add a comment
|
3 Answers
Since JavaScript is an interpreted language, there is no single and conclusive answer to this question, except for: Every time you assign or change a variable, and every time you create a function, your JavaScript engine will handle assigning memory for you. The same is true for freeing up memory, when the resources are no longer needed. Every browser comes with its own JavaScript engine, so the way this is done may vary greatly.
Comments
JavaScript allocates and frees memory automatically. Furthermore, there's no pointer arithmetic in JavaScript.
2 Comments
abson
where is (say Math) whatever it is stored??
sjngm
@Abkutty: the browser supplies it as some sort of "internal library" (please no technical discussion about this term). It's internal and you don't need to care about it. It's somewhat related to using some sort of a dynamic library.