What wrapper class in C++ should I use for automated resource management?

前端 未结 8 1121
余生分开走
余生分开走 2020-12-16 13:56

I\'m a C++ amateur. I\'m writing some Win32 API code and there are handles and weirdly compositely allocated objects aplenty. So I was wondering - is there some wrapper clas

8条回答
  •  情书的邮戳
    2020-12-16 14:32

    Here's one based off the EnsureCleanup code from 'Windows via C/C++': http://www.codeproject.com/KB/cpp/template2003.aspx

提交回复
热议问题