Germano Percossi wrote:
> Hi all
>
> Is there any way to delete global objects from memory?
> Specifically I need to delete some macro definitions loaded when loading
> my macro.
> I load the macro "macro.cxx" that contains an #include directive for a
> file "macro.hh", that contains some #ifndef and #define commands;
> unloading macro.cxx, macro definitions are still there (obviuosly) but
> this forbid macro.hh to be loaded again.
>
> Till now I tried with (supposing my macro is MACRO_H)
>
> gROOT->GetListOfGlobals()->FindObject("MACRO_H")->Delete()
>
> and all its casted variants but when typing again
>
> gROOT->GetListOfGlobals()->ls()
>
> but arrived at the former MACRO_H position root gives me "segmentation
> violation"
>
> I'd prefer to avoid gROOT->Reset() if possible because there are a lot
> of circumstances that I want to delete my global variables without
> resetting the environment.
>
> I use ROOT v4.00/04 binary version for Linux and gcc 3.3.2
Is there any suggestion? Also this time it would
be better to migrate to a new version?
And in this case, it would be better to compile by
myself?
Regards
-- \ | / (@ @) -o00-(_)-00o------------ ------------------------------------------------------------ Germano Percossi University of Rome "Tor Vergata" and INFN Roma2 Via della Ricerca Scientifica 1 I-00133 Rome Italy Phone : 06 7259 4824 Room : c0 28b ------------------------------------------------------------Received on Fri May 06 2005 - 19:46:26 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET