Is there a C++/CLI smart pointer project (e.g. sco

2019-03-18 12:46发布

Is there a C++/CLI RAII smart pointer class for containment of a native pointer in a managed type? Just wondering, before I go write my own clr_scoped_ptr value class template.

I'm aware of the Microsoft-provided:

The above two are similar to auto_ptr or unique_ptr.

But all these are for disposing managed ref class instances, not for freeing native objects.

1条回答
看我几分像从前
2楼-- · 2019-03-18 12:58

This one looks fairly complete, but I'm not looking for silent transfer of ownership ala auto_ptr.


I've posted my version under a rather permissive license over at codereview.se

查看更多
登录 后发表回答