Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 21,843 posts.

Software Engineering
Any year
19544

The Power of Lifetimes

The execution of a program unfolds over some interval of time. The lifetime of every temporary resource (e.g., variable or object) is the time span between that resource’s “creation” and “destruction”. This lifetime is wholly contained within the typically-longer lifetime of the program.