Re: Who's responsible for deletion?

From: Valery Fine (fine@bnl.gov)
Date: Mon Sep 14 1998 - 16:56:47 MEST


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                              



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:37 MET