My latest column for Visual Studio Magazine is now available online: Resource Management in the Windows API, or as I originally called it, Getting a handle on the Windows API.
It’s fair to say the use of constructor/destructor pairs for resource management is one of the most fundamental aspects of C++. I might even go out on a limb and say it’s the most important feature that distinguishes C++ from its predecessor, and even younger languages such as Java and C#. This ability to manage resources reliably and predictably is what makes it practical to write large programs in C++ that are both correct and efficient. In this column, I’ll explore a few options for managing resources in the Windows API and describe some of the pros and cons of each.
My next course, Modern C++ Concurrency, is on its way.
Have you missed one of my previous courses? Master the essentials of COM, DirectX with C++, and even C programming!
You can also find me on Twitter at twitter.com/kennykerr.