New does not guarantee heap allocation and simply avoiding new does not guarantee stack allocation. New is always used to allocate dynamic memory, which then has to be freed. By doing the first option, that memory will be automagically freed when scope is lost.

Understanding the Context

It is NOT 'bad' to use the new keyword. But if you forget it, you will be calling the object constructor as a regular function. If your constructor doesn't check its execution context then it won't notice that 'this' points to different object (ordinarily the global object) instead of the new instance. Therefore your constructor will be adding properties and methods to the global object ...

Key Insights

The Washington Post: Pope Leo, in new biography, resists doctrinal change on hot-button topics VATICAN CITY — In a new biography containing his most extensive public reflections since he ascended to the throne of St. Peter in May, Pope Leo XIV says he has no intention to ordain women — but is ...