0

I have two question about memory usage in javascript:

  1. I read a lot about memory leak, but how the memory affect the performance? Is there any damage?

  2. Without memory leak, if I use memory too much, like reach some limit of the browser(does the browser have memory usage limit?), does this effect performance?

hh54188
  • 14,887
  • 32
  • 113
  • 184

1 Answers1

0

Browsers do have a Memory-limit (mostly at about 5 MB). When this limit is reached, the user gets a message, that the website requests more than x MB and asks the user if the website is allowed to do so.

memory leaks and heavy memory usage shouldn't have a too big impact on the performance, but it's always a good thing to prevent these. Try to only use what you actually need and don't create hundreds or thousands of useless objects.

Neutrosider
  • 562
  • 3
  • 12