Hi Alberto, I am using the same construction in many places in an Alice event structure. What I normally do is that one TObjArray owns the objects and the others not. Deleting should then only be done from the 'owner array' whereas in the others the pointer should be 'cleared'. Cheers, Nick. -- Dr. Nick van Eijndhoven mailto:nick@phys.uu.nl http://www.phys.uu.nl/~nick -------------------------------------------------------------------------- Org.: Utrecht University, Faculty of Physics and Astronomy Address: Princetonplein 5, NL-3584 CC Utrecht, The Netherlands Phone: +31-30-2532331(direct) +31-30-2531492(secr.) Fax: +31-30-2518689 CERN: +41-22-7679751(direct) +41-22-7675857(secr.) Fax: +41-22-7679480 Offices: Buys Ballot laboratory Room 710 (Utrecht) B23 1-020 (CERN) -------------------------------------------------------------------------- Alberto Pulvirenti wrote: > > Hello, > > I have a question. > Suppose that I have two different TObjArray or TList which contain an > instance of a certain object. When I delete it from the first > TObjArray/TList, have I to do something with the other one in order to > avoid segfault errors? > > Thanks > > Alberto
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET