From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a133c3f6fb1e42eb,start X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: ANNOUNCE: smart pointers pattern posted to ACM archives Date: 1999/03/01 Message-ID: #1/1 X-Deja-AN: 449685368 Sender: matt@mheaney.ni.net NNTP-Posting-Date: Sun, 28 Feb 1999 16:07:26 PDT Newsgroups: comp.lang.ada Date: 1999-03-01T00:00:00+00:00 List-Id: An article about smart pointers for Ada95 has been posted to the patterns archive at the ACM. A description appears below. Last year, I posted an article about the Interpreter pattern, and implemented the example using (dumb) pointers. The client had to manually free the pointers when he was done with them, which often required some tortuous logic in order to handle storage errors and prevent memory leaks. The example has been completely re-written using smart pointers, which has considerably simplified the implementation, because you don't have to do any thinking about memory reclamation. The smart pointers take care of that for you. To subscribe to the patterns list, send the message (body) subscribe patterns to the ACM mail-list server. You can also subscribe from the web page. Smart Pointers In this article I discuss how to implement "smart pointers," which keep track of how many references there are to an object, and automatically return the object to storage when there are no more references.