Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!infopiz!lupine!rfg From: rfg@NCD.COM (Ron Guilmette) Newsgroups: comp.lang.c++ Subject: Re: Smart pointers and stupid people (was: garbage collection...) Message-ID: <3781@lupine.NCD.COM> Date: 8 Feb 91 04:59:22 GMT References: <3344@lupine.NCD.COM> <4174@osc.COM> Distribution: comp Organization: Network Computing Devices, Inc., Mt. View, CA Lines: 24 In article cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: >>>>>> On 26 Jan 91 08:47:22 GMT, tma@osc.COM (Tim Atkins) said: > >With this design for GC, the key is to implement objects AND access to objects >that obey this. The problem has been that the standard (dumb) dereferencing of >pointers is not safe and, therefore, must be controlled (which means use them >only when controls allow AND they have been computed as being correct). Right. If you are going to be using dumb pointers to things that may be deleted, they you must do so with great caution. These uses of dumb pointers must be "controlled". One useful approach to begin to control all such uses of dumb pointers is to first *contain* them (in a limited area of your program). Another word for "containment" is "encapsulation". -- // Ron Guilmette - C++ Entomologist // Internet: rfg@ncd.com uucp: ...uunet!lupine!rfg // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.