Abstraction of memory management

Memory management means that you're actually interacting directly with the hardware to store/update/free blocks of memory yourself from your code. Most higher level programming languages take away the memory management from the developers.

This is because managing memory is hard. It really is! In complicated programs, humans are bound to make mistakes and cause a ton of problems, not limited to memory leaks (which is the easiest mistake someone can make).

Of course, this abstraction comes at a performance cost. But compared with the security, readability, and convenience advantages, this is a fair deal.

JavaScript also manages memory automatically. The JavaScript engine is responsible for registering memory ...

Get Learn ECMAScript - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.