{"title":"Explicit reference counts","authors":"J.J. Martin","doi":"10.1109/SECON.1996.510164","DOIUrl":null,"url":null,"abstract":"The paper advocates the routine use of explicit reference counts to manage storage in imperative language programs. While the principle of the method is not new-most text books on data structures describe it, albeit tersely-commercial software regularly uses ad hoc approaches to storage management; therefore an in-depth account of this effective and systematic method is indicated. The object to be managed are assumed to be instances of abstract data types or of object classes defined by modules. It is proposed to equip these objects with reference counts and the operations KEEP (increase reference count) and RELEASE (decrease reference count and, on zero, free the object). In class libraries these operations should be incorporated into the root classes and thus inherited by all classes. The method reference counts has the following merits: all deallocation decisions are based on considerations local to some module. Copying of data structures for simplifying deallocation decisions is avoided. The rules for using KEEP and RELEASE are simple and systematic. KEEP and RELEASE are used only to establish or revoke long-term claims to objects. The method is uniformly applicable to all types of objects (except recursive lists), mutable and immutable.","PeriodicalId":338029,"journal":{"name":"Proceedings of SOUTHEASTCON '96","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1996-04-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of SOUTHEASTCON '96","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SECON.1996.510164","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
The paper advocates the routine use of explicit reference counts to manage storage in imperative language programs. While the principle of the method is not new-most text books on data structures describe it, albeit tersely-commercial software regularly uses ad hoc approaches to storage management; therefore an in-depth account of this effective and systematic method is indicated. The object to be managed are assumed to be instances of abstract data types or of object classes defined by modules. It is proposed to equip these objects with reference counts and the operations KEEP (increase reference count) and RELEASE (decrease reference count and, on zero, free the object). In class libraries these operations should be incorporated into the root classes and thus inherited by all classes. The method reference counts has the following merits: all deallocation decisions are based on considerations local to some module. Copying of data structures for simplifying deallocation decisions is avoided. The rules for using KEEP and RELEASE are simple and systematic. KEEP and RELEASE are used only to establish or revoke long-term claims to objects. The method is uniformly applicable to all types of objects (except recursive lists), mutable and immutable.