I have two files,
Foo_2.C, which contain a class definition w/ same name (
Foo), but different initializers for their data members.
Then, in a python steering file (
steering.py) I load the classes sequentially in cling as interpreted macros, and use another interpreted macro (
printBar.C) to perform operations w/ the class members. In my simple example, this just prints the value of the data member
bar of the
Foo instance in question.
At the end of one iteration, I unload the macros using
What I observe is that the
bar value that gets printed is always the one of the first class that’s been loaded in cling. It looks like despite the class being unloaded, cling doesn’t free stuff in memory as one would expect…
Can you tell me what is wrong with this workflow, and what suggestions you might have to make this work?
I attach the set of files for a minimal working example.
Many thanks in advance for the help.
ROOT Version: 6.14/06
Platform: Not Provided
Compiler: Not Provided