...
首页> 外文期刊>MSDN Magazine >Smart Cleanup Achieve More Reliable Resource Management with our Custom C++ Classes
【24h】

Smart Cleanup Achieve More Reliable Resource Management with our Custom C++ Classes

机译:智能清理通过我们的自定义C ++类实现了更可靠的资源管理

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

获取外文期刊封面封底 >>

       

摘要

Managing resources in C++ is not easy. When you're unsuccessful, your app can leak all kinds of resources including file system handles, database connections, and, of course, memory. Even in garbage-collected languages like Managed C++, resource management is difficult because garbage collection only deals with memory management, not the other resources that cause performance problems. In this article, the author describes the SmartAny template library he created, which uses a policy-based approach to dynamic resource management. Readers will learn how to use the SmartAny classes and policies to ensure the proper cleanup of their resources, be they files, OS handles, or native and unmanaged objects.
机译:用C ++管理资源并不容易。如果不成功,您的应用程序可能会泄漏所有类型的资源,包括文件系统句柄,数据库连接以及内存。即使在诸如Managed C ++之类的垃圾收集语言中,资源管理也很困难,因为垃圾收集仅处理内存管理,而不处理引起性能问题的其他资源。在本文中,作者介绍了他创建的SmartAny模板库,该库使用基于策略的方法进行动态资源管理。读者将学习如何使用SmartAny类和策略来确保正确清理其资源,无论是文件,操作系统句柄还是本机和非托管对象。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号