News for hackers. Stuff that matters.
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by sriku on Saturday March 17, 2018 @01:28AM (#16605718)
This is pretty close to the "autorelease pool" concept in objective C - an idea which I copied in C++ for a product around 10yrs ago to good effect.

You wrap an auto release pool around every turn of the event loop, which is the deferred memory release mentioned in the article (I admit I only scanned it). Within the "react" part, this gives you much cleaner way to code even if your code involves raw pointers to objects, as long as they are allocated on the pool and aren't being transferred to another thread or caught in an RC loop - both of which we managed using custom smart pointers.

There are no comments on this comment yet.