Memory leak when writing a TTree with a TClonesArray Branch

Dear all,
I’m trying to write a TTree with a TClonesArray of TGraph in a Branch. I can do it, but the memory usage increases event by event and eventually the program crashes. A simplified version of my macro is attached. I’m using ROOT 5.34/04.

Is there any way to avoid this problem?

Thank you for your help,


test.C (840 Bytes)