{"id":185,"date":"2020-01-02T20:24:21","date_gmt":"2020-01-02T20:24:21","guid":{"rendered":"https:\/\/yonatankra.com\/?p=185"},"modified":"2021-08-10T16:53:39","modified_gmt":"2021-08-10T14:53:39","slug":"memory-allocation-and-garbage-collection-in-javascript","status":"publish","type":"post","link":"https:\/\/yonatankra.com\/memory-allocation-and-garbage-collection-in-javascript\/","title":{"rendered":"Memory Allocation and Garbage Collection in Javascript"},"content":{"rendered":"\n
\"Memory
This is how we can allocate memory – by taking photos. This empty frame is ready to be filled with a memory.\nPhoto by Rolands Zilvinskis on Unsplash<\/figcaption><\/figure>\n\n\n\n

Javascript developers usually don’t care much about memory management. The JS engine does most of the heavy lifting for us. <\/p>\n\n\n\n

In this post I’m going to demonstrate how important it is to understand JavaScript memory management. <\/p>\n\n\n\n

Let’s take a look at an example:<\/p>\n\n\n\n