Tags » RAII

Rule -1: No dynamic allocation unless necessary

Recently on StackOverflow, an original poster found memory leaks in C++ code. It is easy to spot that there is a raw new without delete… 124 more words

Comma Operator RAII Abuse

Here’s a neat little trick that one of my co-workers, Clint Levijoki, discovered. In C++ you often use an RAII wrapper that you place on the stack if you want to be sure that code gets run at a later point. 519 more words

Programming