陶行知全集 第四卷 诗歌.pdf


文档分类:文学/艺术/军事/历史 | 页数:约870页 举报非法文档有奖
1/870
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/870
文档列表 文档介绍
Reference Counting in Library Design – Optionally and with Union-Find Optimization Lutz Kettner Max-Planck Institut Informatik Stuhlsatzenhausweg 85 66123 Saarbr ¨ucken, Germany ******@mpi- ABSTRACT Reference counting has been used and described in abun- dance. We present novel ideas aimed at class implementa- tions in library design: (1) In library design, generic classes can have variable size, such that an optimal decision for or against reference counting is not possible. Wepostpone this decision to the place of class use. (2) In a context, where parison for the case of equality is expen- sive, ., for exact algebraic number representations, we unify representationswhenever equality is detected, thus ef- fectively memoizing equality tests. We explain an e?cient implementation based on an union-?nd data structure. (3) Reference counting andpolymorphic class hierarchiescan bined reusing the pointer in the handle class for the polymorphism. A policy-based generic C++solution realizes all manage all dynamic memory. Categories and Subject Descriptors [Programming Techniques]: Miscellaneous General Terms software library design 1. INTRODUCTION Reference counting has been used and described in abun- dance. The principle idea is that a dynamically managed re- source tracks the number of its users in a reference counter. When the count reaches zero the resource can be released. In the context of C++, reference counting is frequently presented for smart pointers and string classes; in both cases managing dynamically allocated memory. I am interested in the principal way it is used in string classes. But, let me contrast it to its use in smart pointers ?rst. Smart pointers monly presented as a solution for ownership and resource management problems that plain C/C++pointers have with dynamically allocated memory. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted witho

陶行知全集 第四卷 诗歌 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数870
  • 收藏数0 收藏
  • 顶次数0
  • 上传人精品库
  • 文件大小0 KB
  • 时间2016-04-25