开发者

Did anyone give these smart pointers (auto_any, scoped_any, shared_any) a test drive?

开发者 https://www.devze.com 2022-12-25 04:32 出处:网络
I\'m investigating smart pointers w开发者_StackOverflowith \"shared\" functionality for Windows CE and Mobile, where the VS 2008 tr1 std::shared_ptr cannot be used (due to linkage to a v.9 dll not pre

I'm investigating smart pointers w开发者_StackOverflowith "shared" functionality for Windows CE and Mobile, where the VS 2008 tr1 std::shared_ptr cannot be used (due to linkage to a v.9 dll not present on CE, obviously, if I understand it correctly).

There's a semi-old MSDN Magazine article with sources from a Microsoftie (Eric Niebler): Achieve More Reliable Resource Management with Our Custom C++ Classes.

The reasoning, design and implementation of his shared_any looks solid, but I'm wondering if anyone ever actually tested the lot on any platform (not necessarily WinCe/WM)?


You might want to use boost::shared_ptr. As I understand it, the Boost.SmartPointer library is a header-only library, and so you can just copy over the headers you need from Boost to get everything working.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号