Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!cs.umn.edu!kksys!edgar!mmug!UUCP From: Jim.Spencer@p510.f22.n282.z1.fidonet.org.org (Jim Spencer) Newsgroups: comp.lang.c++ Subject: Re: Want pointers on intelligent pointers Message-ID: <669579675.1@mmug.fidonet.org.org> Date: 20 Mar 91 22:11:47 GMT Sender: UUCP@mmug.fidonet.org.org Lines: 17 marc Andrew Pawlowsky writes in a message to All MA> The linked list would be in use, and it is necessary to keep MA> track how many times the objects are being used. MA> While I can call a function other than delete, I thought it would MA> be nice to use destructor oeprator since other people will be MA> using my classes, so if somebody did MA> C::c(void) { MA> A a; MA> ... all sorts of nifty things MA> } MA> "a" would be deleted properly, even though no explicit destuction MA> routine is called. Sorry, I don't mean to be dense, but the A created in C::c() would not be the one in your linked list: it will have been specifically created for use in c() and should be disposed of at the end of c().