Loaded macro not running twice

I created a script to load data into a TGraph (loadData.C) and then call it from a second script (callLoadData.C). callLoadData.C runs ok the first time but fails the second time.

The minimal code to show the problem is:

loadData.C
loadData.C (103 Bytes)

callLoadData.C
callLoadData.C (71 Bytes)

The message error is:

.x callLoadData.C
Function callLoadData() busy. loaded after ā€œ/home/usuario/amiga/Reconstruction/v6/analisis/bug/./loadData.Cā€
Error: G__unloadfile() Can not unload ā€œ/home/usuario/amiga/Reconstruction/v6/analisis/bug/./loadData.Cā€, file busy callLoadData.C:5:

The problem does not happen if the loadData does not create the TGraph. The ROOT version is 5.34/10

Thanks,

Diego

Although this is a very old post, it still comes up in searches and has quite a few views. Adding links to further discussion of this problem in case someone ends up here: