Mixing C code with C++ code
I have a number of C entities (say Nodes), which I want to store to a std::vector temporarily.
The C interface I have to manipulate these nodes consists of:
- Node *newNode(); constructs such nodes
- void freeNode(Node *); frees such nodes
Can I use the RAII technique, so that they are properly freed when the vector goes out of scope?