This pattern is perhaps orthogonal to your problem (deleting all references
upon object destruction), but would at least prevent deleting or destroying
an object while there are live references to it.
Hope some of this helps,
Jonathan
At 04:56 AM 9/14/98 -0500, Valery Fine wrote:
>On 14 Sep 98 at 10:22, Patrick Schemitz wrote:
>
>
>> Doesn't the destructor remove them from the containers?
>
> No it doesn't. Since the object has not "backward pointer to the
>container ('s !).
>
> This means to be "right" ROOT (and any other C++ program too) must
>scan ALL containers created to find out whether the deleted object
>did belong one of them. But the last means one has to create the list
>of all containers as well etc etc etc. It is some of the "well-known"
>problem of C++.
>
> Valery
>=================================================================
>Dr. Valeri Faine (Fine)
> ------------------- Phone: +1 516 344 7806
>Brookhaven National Laboratory FAX : +1 516 344 4206
>Bldg. 510A /STAR mailto:fine@bnl.gov
>Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine
>USA
>
>Dr. Valery Fine Telex : 911621 dubna su
> -----------
>LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
>141980 Dubna, Moscow region Fax : +7 09621 6 51 45
>Russia mailto:fine@main1.jinr.dubna.su
>
>
===========================================================================
Jonathan M. Gilligan <jonathan.gilligan@vanderbilt.edu>
Research Assistant Professor and Associate Director (615) 343-2957
Center for Molecular and Atomic Studies at Surfaces Fax: 343-1708
Dept. of Physics and Astronomy, Box 1807-B Sec'y 322-6438
Vanderbilt University, Nashville, TN 37235 Lab: 343-7578