首页> 外文期刊>C - C++ Users Journal >Unsmart Pointers, Part Ⅰ
【24h】

Unsmart Pointers, Part Ⅰ

机译:不智能指针,第一部分

获取原文
获取原文并翻译 | 示例
           

摘要

The discussion of smart pointers seems never-ending, but one thing is quite clear—no smart pointer design is a panacea. Another thing that is relatively apparent is that a pointer class that automatically destroys the resource is not always desirable. In this article, I describe two hypothetical pointer classes that help prevent and catch errors but do not automatically destroy the resource. I then introduce a single umbrella pointer class, which provides an implementation that covers both cases.
机译:关于智能指针的讨论似乎永无止境,但有一件事很清楚-没有智能指针设计是万能的。相对明显的另一件事是,自动销毁资源的指针类并不总是可取的。在本文中,我描述了两个假设的指针类,它们有助于防止和捕获错误,但不会自动破坏资源。然后,我介绍一个单一的伞形指针类,该类提供了涵盖两种情况的实现。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号