首页> 外文期刊>Embedded Systems Programming >Destruction Aids Memory Management in Object-Oriented C
【24h】

Destruction Aids Memory Management in Object-Oriented C

机译:面向对象C中的销毁辅助存储器管理

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

摘要

Destruction can come in many forms, most of it negative. The destruction I write of is class destruction, the opposite of class construction. It's a most useful tool to understand for memory management when working in object-oriented C (OOC). In this article, we'll discuss how memory-management planning is important when developing an OOC application. We'll examine the ability to dynamically allocate memory for our application window class (AWC) template as well as the foundation classes. We'll also make some changes to the AWC to make it more suitable for data extensive applications. In a two-part article on OOC, I discussed how to create foundation and AWC templates, respectively. In the discussion of the foundation classes, we examined how to create simple classes in C, using structures for containment and functional pointers to create a member function linkage. We also discussed how to create aggregation relationships between classes, which enable classes to have "part-of" relationship with other classes. We also introduced the concept of class resources, which enables the assignment of initial prop erties to a class when the class is constructed. In this article, we'll take these ideas a step further by dynamically creating objects of child classes for use in the parent class.
机译:破坏可以有多种形式,其中大多数是负面的。我写的破坏是阶级破坏,是阶级建设的反面。在面向对象的C(OOC)中工作时,这是了解内存管理的最有用的工具。在本文中,我们将讨论开发OOC应用程序时内存管理计划的重要性。我们将研究为应用程序窗口类(AWC)模板以及基础类动态分配内存的能力。我们还将对AWC进行一些更改,使其更适合于数据广泛的应用程序。在有关OOC的两部分文章中,我讨论了如何分别创建基础和AWC模板。在基础类的讨论中,我们研究了如何使用C的包含结构和函数指针创建成员函数链接,从而在C中创建简单类。我们还讨论了如何在类之间创建聚合关系,以使类与其他类具有“部分”关系。我们还引入了类资源的概念,该概念使得在构造类时可以将初始属性分配给类。在本文中,我们将通过动态创建要在父类中使用的子类的对象,使这些想法更进一步。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号