Tags » RAII

RAII with C libraries: Follow-up

Last week, I talked about the custom deleter feature built into std::unique_pointer, and how we can leverage that to easily add RAII-support to C-libraries. 1,056 more words

C++

A technique for using automatic memory management (RAII) with C libraries

UPDATE: I’ve written a follow-up post on how to implement the idea presented in this post in a simpler and more flexible way. If you’re thinking about using this technique, I’d encourage you to also read the follow-up. 1,522 more words

C++