On Thu, Dec 12, 2024 at 05:17:46 +0800, Bret Busby wrote: > Many years ago, I believe when I was being taught 'C' programming, we were > taught to use two instructions named malloc and (I believe the other > important corresponding instruction), dealloc, [...]
The opposite of malloc() is free(). > and, some software, including > some web browsers (and, the vile javascript) seem to disregard that > instruction and its importance, which is kind of like running an internal > combustion engine without a governor, or, parking a vehicle on a slope, > without engaging the handbrake. These programs aren't written in C. Manual memory management is a dying art. Most languages these days use automatic garbage collection, freeing unused memory when nothing is using it any longer. This makes memory leaks less common, but when they *do* occur, they're quite difficult to find. Usually it means you've accidentally retained a reference to the object in question in some part of the program that never goes away.