Is relying on the type of a Windows handle being a pointer ok?
Windows handles are sometimes annoying to remember to clean up after (doing GDI with created pens and brushes is a great example). An RAII solution is great, but is it really that great making one full (Rule of Five) RAII class for each different type of handle? Of course not! The best I can see would be one full generic RAII class with other classes just defining what to do when the handle should be cleaned up, as well as other handle-specific aspects. For example, a very simple module class could be defined like this (just an example): struct Module { Module() : handle_{nullptr} {} Module