News for hackers. Stuff that matters.
Re:Consider the Nimrod Programming Language by pcwalton on Wednesday March 12, 2014 @11:49PM (#7389955)
Well, you don't have to free in your destructor eagerly: you could incrementally release if you wanted to, and still use RAII. But you're right of course that RAII makes it simplest to eagerly deallocate.

Eager deallocation is usually what you want anyway, because of its cache effects and because you can just release the memory back to the free list (or the OS) and forget about it. If you repeatedly allocate and deallocate a similarly sized block, for example, eager deallocation means that your block will stay in L1 if it fits.

There are no comments on this comment yet.