It is up to you to manage your own objects. If you do: gROOT->GetListOfSpecials()->Add(presenter); In your presenter destructor, you should add something like: gROOT->GetListOfSpecials()->Remove(this); Rene Brun Primrose Mbanefo wrote: > > Hello everyone, > In the following code presenter is an object from the TRootControlBar class. > > gROOT->GetListOfSpecials()->Add(presenter) > > This is a test to know if presenter still exists or if it has been deleted by > another function: > { > end with '}'> if (gROOT->GetListOfSpecials()->FindObject(presenter)) > end with '}'> cout<<"in"<<endl; > end with '}'> else > end with '}'> cout<<"out"<<endl; > end with '}'> } > > But when presenter doesn't exist anymore I get a segmentation fault. > *** Break *** segmentation violation > > I would like to know why I get the segmentation fault and if an object is > automatically removed from the list when it has been deleted by another > function. Isn't there any way of knowing if an object still exists or if it > has been deleted? > Thanks a lot. > Primrose
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:57 MET